This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-13
Channels
- # 100-days-of-code (5)
- # adventofcode (1)
- # announcements (8)
- # beginners (148)
- # boot (17)
- # calva (26)
- # cider (17)
- # cljdoc (2)
- # cljs-dev (55)
- # cljsjs (2)
- # clojure (198)
- # clojure-dev (11)
- # clojure-finland (1)
- # clojure-italy (23)
- # clojure-nl (6)
- # clojure-spec (44)
- # clojure-uk (148)
- # clojurescript (27)
- # clojutre (20)
- # core-logic (21)
- # cursive (12)
- # datascript (10)
- # datomic (33)
- # emacs (11)
- # figwheel-main (49)
- # fulcro (19)
- # graphql (2)
- # off-topic (48)
- # onyx (2)
- # other-languages (53)
- # pedestal (3)
- # reagent (75)
- # reitit (17)
- # rum (1)
- # slack-help (2)
- # specter (2)
- # sql (3)
- # tools-deps (24)
- # unrepl (4)
- # yada (1)
When automating tests and builds with clojure we need to download maven dependencies to the project folder ideally, so we can use gitlab CI caching on the maven dependencies in the project folder. Is there any way to do this with the clojure shellscript and tools.deps? With leiningen we used local-repo https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L145
Yep, use a root attribute in deps.edn of :mvn/local-repo
Hello folks! I am a bit confused by this:
clj -C:gen:new:tmpl -Stree
<- no deps is shown
clj -R:gen:new:tmpl -Stree
<- deps are shown
but the doc says that -C
is for building the classpath...
if I am building the classpath, why is -C
not showing my deps in -Stree
?
(and of course I don't have them in the classpath as well)
my admittedly not very deep understanding is, -A does a lot of stuff, an the other flags like -C and -R do subparts of what -A, I suspect -C only merges the paths entries not the dependency entries. using -A seems to provide most of the kind of default what you would expect from "merging"
there used to be a comment (maybe there still is) the default deps.edn file that said '''
;; make-classpath aliases (-C) affect the classpath generation, options:
;; :extra-paths - vector of additional paths to add to the classpath
;; :classpath-overrides - map of lib to path that overrides the result of resolving deps
@hiredman my alias contains :main-opts
and I do not want to use it for new
and gen
for now
I am launching a REPL against them
Beat me to it... Yeah, @richiardiandrea -C
only pulls in paths and the library overrides. -R
is for dependencies (`:deps`, :extra-deps
, and :override-deps
I think).
ok I think I missed that part of the doc, thanks a lot, I thought classpath meant both path and deps
as customary in all the previous tools 😉
You mostly want -R
or -M
but if you are bringing in test code you probably want -C
for that 🙂
What I recommend is not having :main-opts
in the same alias as anything else -- use a separate alias that is just for running that main.
For example, in several projects I have :test
to set everything up for testing and :runner
to actually run the tests.
so I am using new
and telling my team to just do clj -A:new:tmpl cljs-template org-scope/my-project
I tend to keep all my aliases small and orthogonal -- so they can be composed 🙂
but now I am just in need of a REPL with the deps
so I do not want -M
I guess 😉
Which is exactly why you want the main opts separate from the deps 🙂
Anyways, this works clojure -R:gen:new:tmpl -A:nrepl