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

Avoiding calculate conditional dependencies again for the same configuration, model and project #45081

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

cdsap
Copy link
Contributor

@cdsap cdsap commented Dec 12, 2024

Second Attempt to Mitigate Issue #44940

It is still unclear why the resolved configuration is triggered multiple times when resolving the conditional dependencies during configuration time with the compatible type. During the investigation, I observed that the first resolution is triggered in:

collectConditionalDependencies(baseRuntimeConfig.getResolvedConfiguration().getResolvedArtifacts(), mode);

Subsequently, there are additional resolution in:

Set<ResolvedArtifact> resolvedArtifacts = conditionalDeps.getResolvedConfiguration().getResolvedArtifacts();

This behavior triggers the same resolution an arbitrary number of times.

This PR avoids triggering a new resolution of the conditional dependencies when the mode, project, and configuration have already been resolved. While this workaround reduces configuration time, the underlying cause of the multiple resolutions in the tests remains to be understood. The investigation continues but with this PR we reduce the current configuration time for large projects:

3.16.4

This PR

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle labels Dec 12, 2024
@gsmet
Copy link
Member

gsmet commented Dec 13, 2024

@aloubyansky wondering if the findings here could lead to an investigation on our side?

Copy link
Member

@aloubyansky aloubyansky left a comment

Choose a reason for hiding this comment

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

Thanks @cdsap !

Copy link

quarkus-bot bot commented Dec 13, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit c57799c.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@aloubyansky aloubyansky merged commit 805c3f3 into quarkusio:main Dec 13, 2024
20 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.18 - main milestone Dec 13, 2024
@cdsap cdsap deleted the avoid_multiple_resolution branch December 14, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants