Avoiding calculate conditional dependencies again for the same configuration, model and project #45081
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
quarkus/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/dependency/ConditionalDependenciesEnabler.java
Line 50 in fc237a6
Subsequently, there are additional resolution in:
quarkus/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/dependency/ConditionalDependenciesEnabler.java
Line 122 in fc237a6
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