-
Notifications
You must be signed in to change notification settings - Fork 199
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
Report Misses Dependencies because of Unchecked Configurations #507
Comments
I believe the problem that we had is the whole I am fine if we can refine this or somehow do it correctly. You can see the discussion in #378 and the linked issues. Maybe we were running into that copy bug and fixing that would have solved our problems. |
What would happen if Could we define an input closure allowing to configure configurations? |
By removing we would try to resolve configurations which are not allowed for dependency resolution. Prior versions of Gradle allowed all to be resolved, so we iterated over all of them to generate the report. If you try removing now, you'll observe a lot of errors when Gradle rejects resolution. It might be that we should try to resolve, catch the error, and suppress it. I find the documentation on this concept very confusing and it seems to be ad hoc in usages by Kotlin & Android, and that Since the failure is an immediate throwing of an exception, I kind of think the best is just to try and log.info that we skipped it. That way we get the most accuracy and don't try to detect on whatever the metadata claims. That should be fast and maybe least error prone. What do you think? |
Potential errors shouldn't bother us. That's why we've got tests. I have nothing against your suggestion. It's more like the opposite, i.e. I'd actually prefer it. Speaking of my projects I don't see the point in skipping a configuration. I also like your idea because it would take only a minimal change to make it happen. We could start by reverting the change to sources from 1c6627e. Are you fine with changing the log level right here? Lines 83 to 91 in 9bef5cb
Maybe we should also change the wording to what you wrote. Like |
Yep, I'm fine with the log level being changed and using your new message format. |
…Configurations * removed "isUsefulConfiguration" check -> from now on we analyze all configurations * configuration resolution errors are logged at "info" -> this is motivated by the fact that Gradle itself triggers the error, so we simply document that behavior
Closing since agreed changes have already been merged (see #522). |
I'm missing dependencies when checking the report. When debugging the plugin using an included build I discovered that the configurations holding the missing dependencies are being skipped because they are not classified "useful":
gradle-versions-plugin/src/main/groovy/com/github/benmanes/gradle/versions/updates/DependencyUpdates.groovy
Lines 70 to 78 in 6f7b95d
When running the above code with
resolve(...)
for all configs more dependencies are reported.Since the reason behind the
isUsefulConfiguration
flag is not self-explanatory it would be nice to know why it's necessary. However, there should be another way to manage this.I also found out that
Failed to resolve ...
error messages may occur because some constraints inside selected configurations can't be copied. It happens when trying to copy the configuration itself:gradle-versions-plugin/src/main/groovy/com/github/benmanes/gradle/versions/updates/Resolver.groovy
Line 273 in 6f7b95d
Since this is a Gradle issue I raised one on their end.
I use the latest plugin version
0.38.0
running with Gradle6.7.1
The text was updated successfully, but these errors were encountered: