This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-28
Channels
- # announcements (5)
- # babashka (7)
- # beginners (46)
- # biff (28)
- # calva (7)
- # cider (3)
- # clerk (82)
- # clj-commons (9)
- # clj-kondo (7)
- # clojure (37)
- # clojure-dev (16)
- # clojure-europe (18)
- # clojure-norway (7)
- # clojurescript (8)
- # clojureverse-ops (3)
- # cursive (5)
- # datomic (4)
- # emacs (20)
- # exercism (2)
- # lsp (58)
- # off-topic (32)
- # polylith (11)
- # reitit (7)
- # tools-build (7)
- # xtdb (4)
I've tried to test everything in here but if you see any technical errors -- or just have Qs about stuff here -- please let me know in a thread. Thank you!
> tools.build
is a library for building artifacts in Clojure projects, which are typically library .jar
files for deployment to repositories like https://clojars.org for others to use or application .jar
files to run on servers on in containers.
Is this the second "on" meant to be "or" on servers on in containers
?
> Unlike https://leiningen.org/, which was more of a "batteries-included" approach, the CLI assumed that you would declare additional tooling through "aliases" in deps.edn
that added extra dependencies and evolved, over time, to support both traditional command-line invocation
Did you mean ~/deps.edn here?
"adds" and "evolves"?
> └─$ clojure -T:build hello :name '"Build"'
> Hello, Build!
> └─$ clojure -T:build hello :name "Build"
> Hello, Build!
> └─$ clojure -T:build hello :name Build
> Hello, Build!
works without single quote or any quote.
2 :aliases
3 {
4 :api0 {:ns-default my-proj.api} ;; clojure -X:api0 foo :bar 42
5 :api1 {:ns-default my-proj.api ;; clojure -X:api1 :bar 42
6 :exec-fn my-proj.api/foo}
7 :api2 {:exec-fn my-proj.api/foo} ;; clojure -X:api2 :bar 42
8 :api3 {:ns-default my-proj.api ;; clojure -X:api3 :bar 42
9 :exec-fn foo}}
when :exec-fn is first introduced ns-default is still there perhaps exec-fn can be just "foo".
Great doc!@UP82LQR9N Thanks! on
-- yes, typo, fixed; deps.edn
is correct -- it could be your local project file or your user file; adds/evolves -- clarified that sentence (the aliases add dependencies, but the CLI evolved); '"Build"'
is how you pass a string -- "Build"
and Build
both pass a symbol, which happens to work in this case but isn't technically correct (and I wanted, specifically, to highlight how to pass strings); :exec-fn
-- since folks often have this without :ns-default
, I wanted to show the fully-qualified version but I've added a comment saying it could be unqualified in this case. Good feedback!
a beginner question, in which directory in local the deps.edn stores the downloaded jar file?
maven jars are all stored in the ~/.m2/repository cache