This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-06
Channels
- # announcements (3)
- # asami (41)
- # aws (2)
- # babashka (65)
- # beginners (85)
- # biff (7)
- # calva (10)
- # cider (5)
- # cljsrn (32)
- # clojure (6)
- # clojure-czech (3)
- # clojure-europe (10)
- # clojure-russia (4)
- # clojure-uk (3)
- # clojurescript (5)
- # core-typed (7)
- # data-science (13)
- # datomic (43)
- # etaoin (4)
- # fulcro (22)
- # graphql (3)
- # gratitude (1)
- # helix (1)
- # joyride (2)
- # liquid (10)
- # malli (16)
- # off-topic (10)
- # other-languages (1)
- # polylith (10)
- # reitit (3)
- # scittle (7)
- # shadow-cljs (103)
- # tools-deps (10)
- # vim (9)
- # xtdb (2)
Is there a way to get the dependency tree of a project as data? I'm trying to figure out the paths that lead to a specific transitive dependency and clojure -Stree | grep <dependency name> -B 8
unfortunately includes a lot of garbage from other branches, which I'm not interested in.
It's quite possible that I'm focusing on the wrong thing, so happy to consider a different approach as well!
edit: The real "why" is that there's a known vulnerability for one of my transitive dependencies, so I'm trying to figure out which of my direct dependencies will be affected if I upgrade it (override it with a newer version)! 🙂
Oh sweet, thanks! Is this documented? On my phone right now but I swear I looked in the https://clojure.org/reference/deps_and_cli first and couldn't find it. 😅
-X:deps tree is documented there and the docs for the tree function are at https://clojure.github.io/tools.deps.alpha/clojure.tools.cli.api-api.html#clojure.tools.cli.api/tree
what’s the way to invoke -X
with an environment variable? clj -X :filename $OUT_FILE
style?
yeah. but i need to enable expansion in the shell and then ensure it’s readable to clojure and i’ve forgotten the exact sequence of double and single quotes necessary to thread that needle
$ bb -e "*command-line-args*" $OUTFILE
("foo")
$ bb -e "*command-line-args*" \"$OUTFILE\"
("\"foo\"")
$ bb -e "(edn/read-string (first *command-line-args*))" \"$OUTFILE\"
"foo"
clojure -X :filename '"'$OUTFILE'"'
(I use that in several invocations -- also with '"'$(...)'"'
)