-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Capability conflict not detected for a certain dependency ordering #22326
Comments
We were hitting this again today. Maybe there is also a relationship to (some cases of) #14220. |
Another reproducer. Without using any additional plugins, just a dependency to Guava which now publishes Gradle Metadata with capabilities: google/guava#6618 (comment) |
Any chance fixing this may get some priority? This is a quite severe issue for projects that aim for a clean dependency graph by utilizing capabilities to detect and resolve conflicts. If this mechanism is not reliable, it is very hard to use and might break suddenly when you add a new dependency. |
This issue is still present in |
If I have dependencies defined in a specific order (see reproducer) a capability conflict is not detected.
Expected Behavior
The capability conflict is detected and resolved as defined in the corresponding capabilities resolution strategy.
Current Behavior
The capability conflict is not detected. (Workaround: Change the order of dependencies.)
Context
This issue suddenly appeared when we added a dependency (Hibernate in this case) again in another place to make it visible there at compile time. Without the detection of the conflict, we got multiple Jars with the same classes on the classpath.
Steps to Reproduce
$ ./gradlew :extension:dependencies --configuration=runtimeClasspath --scan
and inspect the resultjavax.transaction:javax.transaction-api:1.3
andorg.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final
is not detected although both have thejavax.transaction:javax.transaction-api
capabilityapp/build.gradle.kts
- the conflict is now detectedYour Environment
Build scan URL - with issue: https://scans.gradle.com/s/sljcle3av5nae/dependencies?dependencies=transaction&expandAll&focusedDependency=WzAsMCwxMixbMCwwLFswXV1d
Build scan URL - issue disappeared after changing order: https://scans.gradle.com/s/zydyc3jau2jho/dependencies?dependencies=transaction&expandAll&focusedDependency=WzAsMCwyLFswLDAsWzBdXV0
The text was updated successfully, but these errors were encountered: