-
Notifications
You must be signed in to change notification settings - Fork 8
Add :exclusions to non maven libraries descriptions #63
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
Add :exclusions to non maven libraries descriptions #63
Conversation
|
Thanks much for the PR!
Not a concern, fortunately - Lein doesn't use this code and doesn't have the notion of classpath overrides. Would you be able to expand the t.deps-specific test suite? It should be fairly easy. Cheers - V |
bf952bf to
330063d
Compare
| {:deps {io.github.nubank/morse {:git/tag "v2023.10.06.02" :git/sha "88b5ff7"}} | ||
| :aliases | ||
| ;; let's swap the Clojure compiler by ClojureStorm | ||
| {:storm {:classpath-overrides {org.clojure/clojure nil} ;; for disabling the official compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer an additive change to not lose coverage, e.g. flowstorm2/deps.edn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, np, but shouldn't that test cover both cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to rest assured - to me these are just data - very cheap to accrete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
330063d to
b1b59e0
Compare
| :local/root])) | ||
| ;; use m (and not the select-keys result) to honor `:exclusions`: | ||
| [dep m]))) | ||
| [dep (assoc m :exclusions classpath-overrides-vector)]))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment in L164 makes be believe m can have :exclusions - aren't we at risk of overriding them?
What about:
[dep (-> m
(update :exclusions into classpath-overrides-vector)
(update :exclusions vec))]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah, you are right. Done!
b1b59e0 to
4dc83f9
Compare
Currently when a :classpath-override map is provided in deps.edn the overrides vector is being added as exclusions only to maven libraries.
So if we have a library, like in this case
io.github.nubank/morsewhich includes a version oforg.clojure/clojure, andwe are adding it as a git lib, like this :
{:aliases {:dev {:extra-deps :classpath-overrides {org.clojure/clojure nil} ;; swapping compilers {com.github.flow-storm/clojure {:mvn/version "1.11.2-4"} io.github.nubank/morse {:git/tag "v2023.10.06.02" :git/sha "88b5ff7"}}}}}then the resulting classpath will include
org.clojure/clojureeven if we told it to exclude it.This PR fixes this. Not sure how this affects the lein path of this tool.