Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only include bootstrap dependencies in quarkus:dev ClassPath #12156

Merged
merged 1 commit into from
Oct 22, 2020

Conversation

stuartwdouglas
Copy link
Member

The rest of the depenencies are resolved in the bootstrap resolver,
having them on the ClassPath only causes problems.

A similar fix could be applied to Gradle, however I am not sure
how to filter the dependencies to only include those required
for bootstrap.

Fixes #12136

@aloubyansky
Copy link
Member

We had that for a reason though. I don't remember exactly the issues it solved but wondering whether this will lead to regressions. Not yet sure if that's related but this test DevMojoIT.testThatAddingConfigFileWorksCorrectly:530 failed on linux and windows.

@stuartwdouglas
Copy link
Member Author

That probably is related, I will need to look into why (I tested dev mode locally and it worked, but there must be a problem somewhere).

@jaikiran
Copy link
Member

jaikiran commented Sep 17, 2020

We had that for a reason though. I don't remember exactly the issues it solved but wondering whether this will lead to regressions.

It was this #7521. Looking at the name of that failing test, the failure indeed is related to the test change that was introduced in the link PR to catch any regression in this area.

@stuartwdouglas
Copy link
Member Author

Ok, so I think I need to figure out the parent first artifacts and include them.

@stuartwdouglas
Copy link
Member Author

I have changed this to still add parent first artifacts. Lets see what CI has to say.

@@ -93,6 +95,7 @@
*/
@Mojo(name = "dev", defaultPhase = LifecyclePhase.PREPARE_PACKAGE, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME)
public class DevMojo extends AbstractMojo {
private static final String EXT_PROPERTIES_PATH = "META-INF/quarkus-extension.properties";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's io.quarkus.bootstrap.BootstrapConstants.DESCRIPTOR_PATH, btw.

@@ -70,7 +70,7 @@ public static AppArtifactKey fromString(String str) {
protected final String classifier;
protected final String type;

protected AppArtifactKey(String[] parts) {
public AppArtifactKey(String[] parts) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like this change is necessary. There is already public AppArtifactKey(String groupId, String artifactId, String classifier, String type)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes the code a lot simpler. This is the ctor that is used by the existing code that reads from quarkus-extensions.properties, I would need to copy the logic.

@aloubyansky
Copy link
Member

Looks good, the JDK 11 CI has failed, I've restarted the CI, just in case.

if (parentFirst != null) {
String[] artifacts = parentFirst.split(",");
for (String artifact : artifacts) {
parentFirstArtifacts.add(new AppArtifactKey(artifact.split(":")));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is AppArtifactKey.fromString(str) actually.

@aloubyansky
Copy link
Member

It looks like it fails on /home/runner/work/quarkus/quarkus/integration-tests/maven/target/test-classes/projects/project-classic-run-noconfig-add-config

@aloubyansky
Copy link
Member

in dev mode

The rest of the depenencies are resolved in the bootstrap resolver,
having them on the ClassPath only causes problems.

A similar fix could be applied to Gradle, however I am not sure
how to filter the dependencies to only include those required
for bootstrap.

Fixes quarkusio#12136
@aloubyansky aloubyansky merged commit cd53960 into quarkusio:master Oct 22, 2020
@gsmet gsmet modified the milestones: 1.10 - master, 1.9.1.Final Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ServiceConfigurationError with "not a subtype" for external library in dev mode
4 participants