Skip to content
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

Preserve transitive dependency tree by using :managed-dependencies #91

Open
RickMoynihan opened this issue Jul 31, 2019 · 1 comment
Open

Comments

@RickMoynihan
Copy link
Owner

RickMoynihan commented Jul 31, 2019

lein-tools-deps currently works by asking tools.deps to resolve all dependencies before adding them and all their transitive dependencies flattened into leiningen's :dependencies vector.

This guarantees leiningen picks the same versions of transitive dependencies as tools.deps, but it does mean if you're using lein-tools-deps to produce a library, all your transitive dependencies are lifted; which makes resolving dependencies conflicts through :exclusions etc much harder for your consumers.

@favila suggested a potential solution to this, which is to load all deps into :managed-dependencies and just the immediate roots from deps.edn into :dependencies. This should both guarantee the same resolution, and preserve the hierarchy of the transitive dependency tree, and make lein-tools-deps much more suitable for publishing libraries.

@RickMoynihan
Copy link
Owner Author

You can see some of the effects of this issue described here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant