-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Support for (transitive) dependency management / override #1975
Comments
There's at least two:
Post-processing dependencies is somewhat harmful: if users publish a module where they post-processed dependencies this way, users of the published module won't benefit from the post-processing (while they do benefit of the two points above, which do end up in the POM). And coursier/coursier#1390 won't change that: if a project uses it and is published, versions aren't forced the same way for its users (when pulling dependencies that have a BOM, the BOM is only used to fill "holes", that is missing versions in the POM - no version is otherwise forced whatsoever). coursier/coursier#1390 is not a way to share forced dependencies for library authors / users, unless users explicitly add the BOM to their project (and if all libraries each supply their own BOM, it's likely some might conflict…) |
Thanks for your comment, @alexarchambault.
Adding dependencies has the downside, that you misuse the mechanism, as you most likely list dependencies which are only transitively needed. There is a high risk those entries run out of date. The reasons may vary, but will be most likely that the upstream dependencies have changed. There is also the somewhat smaller risk to produce incompatibilities combinations. The Exclusions on the other side, are already propagated to the exported
This is essentially the motivation for this very issue and also coursier/coursier#1390. We need a dedicated way to manage dependencies that transcends into package management like Maven (
I think there is probably a still too vague understanding of the details of coursier/coursier#1390. I envision in it exactly that: a way to let coursier know, that I want to add some dependencies to my current |
Mill currently has no way to influence the transitive version management. Since we already have the
CoursierModule.mapDependencies
task, this is no issue for projects that build applications. But for libraries projects, controlling of downstream dependency selection might be a useful feature.Once we add such feature, we need to make sure, that dependency resolution behaves consistent between inner-module and ivy-module dependencies. Also, we want to write this information in
pom.xml
under<dependencyManagement>
as well as intoivy.xml
as dependency override section.Also sbt does not have this features. It allows to force or specify (transitive) dependency versions, which is what we can do with
mapDependencies
. But it does not support to generatedependencyManagement
-sections inpom.xml
.Some links:
The text was updated successfully, but these errors were encountered: