-
Notifications
You must be signed in to change notification settings - Fork 138
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
Circular POM dependency breaks Licenses task #239
Comments
We're also seeing another StackOverflowError in plugin version 4.3.13, with a different stack trace (but potentially similar root cause). It may not be directly related, but in this case there is a library dependency that uses a It also has a platform/BOM dependency that is used for version alignment (the BOM references a constraint on the library, and the library adds the platform() dependency on the BOM project, so they are cross-referenced, as recommended in the Gradle documentation) And finally, the app module enables Android viewBinding (hence the
Gradle: 7.3 The failed task console output:
And the stack trace:
It appears that DependencyAnalyzer and ArtifactDependencyManager do not handle the potential for circular dependencies, similar to what is described above. I cannot explain why the stack trace is different, for what appears to be the same root cause. NOTE: the issue does not occur with |
I cloned /~https://github.com/d-emrani/Sentry-Bug and ran The second report with incompatible versions is unrelated to the oss licenses plugin and should a new/separate issue. |
I'm not sure what's wrong here, but I just did the same (cloning + running |
So this is a bit of a weird one. With a clean Docker image with tools installed:
I accidentally did this the first time because I had Maybe caching related to the sentry plugin run for the non-release builds is touching a shared cache file for release builds? I'm not convinced the OSS licenses plugin can solve this since the entire stack is org.gradle.* code. The plugin already has cycle detection. This stack overflow is happening from Having them remove that cycle injection would be ideal. |
Alright, thanks for investigating. Yeah, we removed the cycle already, not sure if anything else can be done here, in case there are others who uses this trick with the pom file. |
Describe the bug
Circular dependencies in
.pom
files causes the{Variant}OssLicensesTask
to fail. This is the same problem AGP faced and was fixed in version 7.2.1. https://issuetracker.google.com/issues/232075280To Reproduce
Here's the reproducer /~https://github.com/d-emrani/Sentry-Bug
In the project both
oss-licenses-plugin:0.10.5
andsentry-android-gradle-plugin:3.1.2
are used. The sentry plugin will add aio.sentry:sentry-android-fragment
dependency to the POM file ofandroidx.fragment:fragment
. Becauseio.sentry:sentry-android-fragment
itself depends onandroidx.fragment:fragment
this creates a circle and causes the task to fail.Expected behavior
The task should handle circular dependencies in POM files gracefully.
Additional context
Here's the stacktrace:
The text was updated successfully, but these errors were encountered: