is there a way to exclude a dep from the tree, regardless of how it got there?
:exclusions
appears to be per-dep only, but I want to assert e.g. logback should never be present
@arohner https://clojurians.slack.com/archives/C6QH853H8/p1593633340186100
Is there a way to replace or remove paths in an alias? I want to exclude on of my source paths in just one alias.
My current coping mechanism is to set -Sdeps '{:paths ["some" "paths" ...]}'
on the command line.
@neumann why not move the optional paths to an alias?
@dominicm I'd like to avoid that because I don't want to have to specify another -A:
in all of the cases except one. The extra -A:
is just another thing to forget to do.
@neumann major hack, this removes the src
path from the classpath:
borkdude@vps1918:~$ export classpath=$(clojure -Spath)
borkdude@vps1918:~$ new_classpath=$(bb -o -e '(let [path (System/getenv "classpath"), paths (str/split path #":"), paths (remove #(= "src" %) paths)] (str/join ":" paths))')
borkdude@vps1918:~$ clojure -Scp "$new_classpath"
Clojure 1.9.0
user=>
@borkdude Nice! Yes, I was thinking of maybe using babashka. (Which is amazing! Thank you so much for creating it!)
@borkdude Something like this, using "src"
as the example:
cat deps.edn | bb -I -e '(->> *input* first :paths (remove #{"src"}) vec)'
@neumann if you need only one EDN input value:
$ cat deps.edn | bb -e '(->> *input* :paths (remove #{"src"}) vec)'
["parser" "resources" "inlined"]
-I
is for collecting a lazy seq of multiple EDN input values
Oh! Very nice! Thanks!