Open frou opened 3 years ago
@frou I've been looking for the way to avoid annoying message, but haven't found it yet.
As a "library", I don't want to have org.slf4j/slf4j-nop
by default, because it effets user side project.
As a "tool", I want to have org.slf4j/slf4j-nop
, but currently I cannot specify which aliases to use when installing as "tool".
For "tool", I can create another repository which provides both of antq and slf4j-nop, but I don't want to do this as much as possible because of the extra operational costs.
So If Clojure CLI supports specifying aliases for tool installation, I'd like to deal with it then.
If you have any ideas, PR is very welcomed!
Thank you for the explanation. I suspected that maybe a 2nd repository would be required, and I agree that's too much hassle!
On 4 Sep 2021, at 22:54, Iizuka Masashi @.***> wrote:
@frou I've been looking for the way to avoid annoying message, but haven't found it yet.
As a "library", I don't want to have org.slf4j/slf4j-nop by default, because it effets user side project.
As a "tool", I want to have org.slf4j/slf4j-nop, but currently I cannot specify which aliases to use when installing as "tool".
https://github.com/liquidz/antq/blob/e459ce567edb20ecb3d28f6e2a9df48b3e6a4acb/deps.edn#L13-L14 https://github.com/liquidz/antq/blob/e459ce567edb20ecb3d28f6e2a9df48b3e6a4acb/deps.edn#L26-L27 For "tool", I can create another repository which provides both of antq and slf4j-nop, but I don't want to do this as much as possible because of the extra operational costs.
So If Clojure CLI supports specifying aliases for tool installation, I'd like to deal with it then.
If you have any ideas, PR is very welcomed!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Quoting Alex Miller from https://clojurians.slack.com/archives/C6QH853H8/p1668698984902689:
At the moment, you would need some kind of wrapper for the tool. You could either put that in a separate repo or put it in a subdir and use a git dep with a deps root and a local dep back to the root. I think that should work
You can add
:deps/root
to point to a subdir of a git dep
Sounds promising.
@p-himik Thanks for your information!
A partial solution.
Create an alias in ~/.clojure/deps.edn:
:slf4j-nop {:extra-deps {org.slf4j/slf4j-nop {:mvn/version "2.0.16"}}}
Then invoke as:
clj -A:slf4j-nop -Tantq outdated
Or:
clj -Sdeps '{:aliases {:noop {:extra-deps {org.slf4j/slf4j-nop {:mvn/version "2.0.16"}}}}}' -A:noop -Tantq outdated
https://github.com/liquidz/antq/blob/main/doc/avoid-slf4j-warnings.adoc
Clojure describes tools as:
So could the antq "tool" be changed to automatically have the
org.slf4j/slf4j-nop
dependency, without affecting the user's projects?