-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
"Reason" should not be registered on non-source-containing projects, or fail more gracefully in such cases #463
Comments
Could you please provide a build scan or stacktrace?
On August 30, 2021, GitHub ***@***.***> wrote:
This is more of a question rather than an issue and I'm assuming that
there is something wrong with the project setup or how things are
included but I'm unable to figure out what.
We have a multiproject build that has been using this plugin for some
time. The current version that we're using is 0.73.0 and that seems to
work with the current dependencies. When we try to switch to 0.74.0 or
newer, we get the following report:
Execution failed for task ':presentation:projectHealth'. > Existing
dependencies which should be modified to be as indicated: -
api("com.github.tomakehurst:wiremock-jre8-standalone:2.30.1") (was
testImplementation)
Trying to determine the reason with the id seems to cause a some type
of null pointer issue:
./gradlew :presentation:reason --id com.github.tomakehurst:wiremock-
jre8-standalone > Configure project : Environment has been set to:
dev_config Environment has been set to: dev_config Environment has
been set to: dev_config Environment has been set to: dev_config
Environment has been set to: dev_config Environment has been set to:
dev_config > Task :presentation:locateDependenciesMain Dependency
com.github.spotbugs:spotbugs-annotations has been declared multiple
times: [compileOnly, testCompileOnly] > Task :presentation:reason
FAILED FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':presentation:reason'. >
java.lang.NullPointerException (no error message)
This library is only used in tests within one of the sub-projects. I
tried commenting out all of the code that uses it but leaving the
testImplementation stanza in gradle and it still identifies it as need
to be changed to api.
I'm not sure what the next steps are to isolate what is wrong with our
build and I would really appreciate any help or suggestions you might
have to resolve this.
Plugin version
0.74.0 - 0.77.0
Gradle version
7.0.2 and 7.2
Describe the bug
Please see question above.
To Reproduce
Try to run buildHealth
Additional context
Please see above.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/autonomousapps/dependency-analysis-android-gradle-
plugin/issues/463>, or unsubscribe
<https://github.com/notifications/unsubscribe-
auth/ABJG5PN2MOECBMXFJQ4IEQ3T7OPOPANCNFSM5DCDYYOA>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-
email&mt=8&pt=524675> or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-
email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Here's the same command with
|
This turns out to be a fairly straightforward NPE. My graph algorithm assumed that a node (uniquely identified by some dependency coordinate like This highlights a related issue, which is that the I think what I will do here is resolve the NPE, but it won't give you an answer regarding why that dependency was suggested to be on |
If you provide a reproducer, I'd be willing to take a look as to why the plugin says to move that dependency to |
The fix for the NPE has been merged. I'm going to re-triage this ticket for future work. |
It's taken a couple of days for me to get back to this. I tried the latest version out and the NPE seems to be fixed. There are two snippets included below. The first is the exception I get when I just run I'll work on trying to build a demo that reproduces the issue with a small amount of code.
|
I managed to put together a pretty small example that I think highlights the issue that I'm having. It's in #472 now since this ticket became something a bit different I didn't want to confuse things. |
I wonder if you still see issues in this area in the latest release, 1.0.0-rc04. Almost all of the code involved has been rewritten. |
I've spent a little time on this with version
That may be expected behaviour though. In this case, It's not identifying the issues incorrectly as it was originally anymore so I haven't been able to test it in quite the same configuration. Please let me know if there's anything else you'd like me to test or run. |
Thank you for that feedback! I think I know what's going on with that failure. You shouldn't run it with just On my end, I should probably not register an instance of that task on the root project, or any project, if it has no source. I can see how this would be confusing or even considered a bug in the plugin. |
I just gave it a try with |
Yay!
You're welcome, and thanks to you for the feedback.
On March 29, 2022, GitHub ***@***.***> wrote:
I just gave it a try with :lib:reason and that seemed to work. Thanks
for all your help and support on this!
—
Reply to this email directly, view it on GitHub
<https://github.com/autonomousapps/dependency-analysis-android-gradle-
plugin/issues/463#issuecomment-1082366409>, or unsubscribe
<https://github.com/notifications/unsubscribe-
auth/ABJG5PJNOSI2XM777PDB4DTVCNVFVANCNFSM5DCDYYOA>.
You are receiving this because you commented.Message ID:
<autonomousapps/dependency-analysis-android-gradle-
***@***.***>
|
The issue with |
This is more of a question rather than an issue and I'm assuming that there is something wrong with the project setup or how things are included but I'm unable to figure out what.
We have a multiproject build that has been using this plugin for some time. The current version that we're using is
0.73.0
and that seems to work with the current dependencies. When we try to switch to0.74.0
or newer, we get the following report:Trying to determine the reason with the id seems to cause a some type of null pointer issue:
This library is only used in tests within one of the sub-projects. I tried commenting out all of the code that uses it but leaving the
testImplementation
stanza in gradle and it still identifies it as need to be changed toapi
.I'm not sure what the next steps are to isolate what is wrong with our build and I would really appreciate any help or suggestions you might have to resolve this.
Plugin version
0.74.0 - 0.77.0
Gradle version
7.0.2 and 7.2
Describe the bug
Please see question above.
To Reproduce
Try to run
buildHealth
Additional context
Please see above.
The text was updated successfully, but these errors were encountered: