This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-08
Channels
- # architecture (20)
- # beginners (140)
- # cider (155)
- # cljsjs (1)
- # cljsrn (29)
- # clojure (53)
- # clojure-dev (9)
- # clojure-italy (40)
- # clojure-nl (13)
- # clojure-poland (4)
- # clojure-russia (8)
- # clojure-uk (51)
- # clojurescript (74)
- # cursive (36)
- # data-science (1)
- # datomic (3)
- # emacs (14)
- # fulcro (11)
- # graphql (2)
- # java (21)
- # javascript (2)
- # jobs (3)
- # nrepl (7)
- # off-topic (18)
- # om-next (1)
- # onyx (9)
- # portkey (8)
- # re-frame (72)
- # reagent (64)
- # reitit (4)
- # remote-jobs (1)
- # rum (1)
- # schema (1)
- # shadow-cljs (49)
- # slack-help (1)
- # spacemacs (8)
- # specter (7)
- # tools-deps (27)
- # vim (28)
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)
-Srepro is kind of in an in between state right now - it’s actually including the install deps.edn, but not ~/.clojure/deps.edn.
and the install one includes clojure
uhm...
I do not expect this to always be the case
ok that answers it
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?
there is no way to completely exclude the install-level clojure dep
(although clojure doesn’t run without clojure so I didn’t expect that to be an issue)
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
clj runs clojure.main (always) which requires a class on the runtime. How does self hosted avoid that?
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
well, you could avoid this by invoking tools.deps directly too
that is, as a library, rather than via the script
if you use -A:deps that will add tools.deps.alpha and its dependencies to your classpath. you could even invoke the clojure.tools.deps.alpha.script.make-classpath script directly
clj -A:deps -m clojure.tools.deps.alpha.script.make-classpath --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
something like that - I think that script requires all of those and that they are absolute paths
Ok that is a possible solution thanks
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.