-
Notifications
You must be signed in to change notification settings - Fork 18
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
Questions on dependency management #55
Comments
For Question 2 above, after looking into it more I see that to be able to control versions of transitive dependencies via the version catalog I would need to manually enter some kind of constraint in the Thanks, |
Lets see if I can give useful answers.
|
As always, thanks for the detailed replies.
Thanks, |
(1) Yes it is a circle, but a desired one (and not an infinite one). I also talk about this and give an example in this video. You are right though that, when you already use a platform, often the consistent resolution has no additional effect. But it may always have when transitive dependency versions change indirectly through another dependency upgrade.
(2) I can only repeat that (right now) there is not "best solution for all". 😄 As long as you make sure that you...
...I think it is a good solution. Everything else depends a lot on what gives the best usability for whoever works on the project. The catalog can be used to make things more user friendly, but is completely optional to achieve (a) and (b). (3) Thank you for sharing the example. I have not thought about this and I think I should change |
This use of strictly, where not *all* (transitive) versions are necessarily in the catalog/platform, can have undesired side effects: +--- com.fasterxml.jackson.core:jackson-annotations:2.13.5 \--- com.fasterxml.jackson:jackson-bom:2.13.5 -> 2.15.3 +--- com.fasterxml.jackson.core:jackson-annotations:2.15.3 -> 2.13.5 (c) +--- com.fasterxml.jackson.core:jackson-core:2.15.3 -> 2.13.5 (c) +--- com.fasterxml.jackson.core:jackson-databind:2.15.3 (c) See: #55
Here is the document on Consistent Resolution. Details and motivation can be found in the beginning of the document. Comments are welcome! |
I have a couple of questions around dependency management:
The
org.example.gradle.base.dependency-rules
plugin references theversions
platform project, but in turn theversions
project includes theorg.example.gradle.base.dependency-rules
plugin. This looks like a circular reference? Is this correct, and if so, why is it necessary?Why do we have both the
versions
project and theorg.example.gradle.feature.use-all-catalog-versions
plugin? It seems like theversions
project could be used to declare any constraints, including strict versions. However, looping through the whole catalog and defining everything as a strict version seems like an overkill. For example, I have 80 libraries listed in my catalog, but I only need to define a constraint for two transitive dependencies. So, whether I add these two first to the catalog or not, I would only need to add two constraints to theversions
project, which doesn't seem like a big deal. But having 82 constraints might create some overhead, and just doesn't seem necessary.Thanks,
Peter
The text was updated successfully, but these errors were encountered: