Fork me on GitHub

I have a question, with this deps.edn:

{:paths ["src"]
 :aliases {:dev {:extra-paths ["test"]}
           :self-host {:extra-deps
                       {andare {:mvn/version "0.9.0" :exclusions [org.clojure/clojure]}
                        mount {:mvn/version "0.1.13-SNAPSHOT"}}}}}
and command:
clojure -Srepro -A:dev:self-host -Stree
shouldn't be org.clojure completly excluded from the tree?


(`mount` does not include it)

Alex Miller (Clojure team)18:05:01

-Srepro is kind of in an in between state right now - it’s actually including the install deps.edn, but not ~/.clojure/deps.edn.

Alex Miller (Clojure team)18:05:12

and the install one includes clojure

Alex Miller (Clojure team)18:05:22

I do not expect this to always be the case


ok that answers it

Alex Miller (Clojure team)18:05:36

but the meaning and use of -Srepro is kind of a topic of internal debate atm


so at the moment is there a way to work in isolation? without any interference with the global env?

Alex Miller (Clojure team)18:05:36

there is no way to completely exclude the install-level clojure dep

Alex Miller (Clojure team)18:05:55

(although clojure doesn’t run without clojure so I didn’t expect that to be an issue)

Alex Miller (Clojure team)18:05:05

what are you trying to do?


I am working with self-host ClojureScript so I don't need Clojure for running, but having it on the classpath might cause issues


let me debug and see if that's the issue though


but in general you probably might want to consider the use case

Alex Miller (Clojure team)18:05:22

clj runs clojure.main (always) which requires a class on the runtime. How does self hosted avoid that?

Alex Miller (Clojure team)18:05:03

That is, the entire purpose of clj is to run a class on the JVM


@alexmiller I'm guess -Spath is being used only


Yes I am using it only for building the classpath


And I am using clojure for it

Alex Miller (Clojure team)20:05:57

well, you could avoid this by invoking tools.deps directly too

Alex Miller (Clojure team)20:05:27

that is, as a library, rather than via the script

Alex Miller (Clojure team)20:05:30

if you use -A:deps that will add tools.deps.alpha and its dependencies to your classpath. you could even invoke the script directly

Alex Miller (Clojure team)20:05:44

clj -A:deps -m --config-files /path/to/whatever.edn --libs-file /path/to/out.lib --cp-file /path/to/out.cp --jvm-file /path/to/out.jvm --main-file /path/to/out.main -R :self-host

Alex Miller (Clojure team)20:05:12

something like that - I think that script requires all of those and that they are absolute paths


Ok that is a possible solution thanks

Alex Miller (Clojure team)21:05:31

if you want to write code instead, you could drop down to the tools.deps.alpha layer and write a few lines of code instead.