This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-27
Channels
- # announcements (24)
- # babashka (26)
- # beginners (8)
- # calva (8)
- # clojure (78)
- # clojure-europe (1)
- # clojure-norway (22)
- # clojurescript (14)
- # datascript (5)
- # datomic (8)
- # fulcro (22)
- # helix (9)
- # humbleui (11)
- # malli (4)
- # off-topic (28)
- # pedestal (5)
- # reitit (10)
- # shadow-cljs (2)
- # tools-build (8)
- # tools-deps (9)
When I trying to run a tools alias as below, I notice cli is trying to fetch a load of dependencies from central, may I know where are those things come from? A quick grep from github suggests those may come from tools.deps.alpha
? But I thought that repo is deprecated 2 years ago. Why are those things being fetched as the cmd go?
{:aliases :build {:extra-paths ["build"]
:extra-deps {io.github.clojure/tools.build {:mvn/version "0.9.6"}}
:ns-default build}}
Downloading: org/clojure/tools.cli/1.0.214/tools.cli-1.0.214.pom from central
Downloading: com/cognitect/aws/api/0.8.612/api-0.8.612.pom from central
Downloading: com/google/guava/guava/31.1-android/guava-31.1-android.pom from central
Downloading: org/apache/maven/maven-core/3.8.6/maven-core-3.8.6.pom from central
Downloading: commons-io/commons-io/2.11.0/commons-io-2.11.0.pom from central
Downloading: com/cognitect/aws/endpoints/1.1.12.321/endpoints-1.1.12.321.pom from central
Downloading: javax/inject/javax.inject/1/javax.inject-1.pom from central
Downloading: org/clojure/java.classpath/1.0.0/java.classpath-1.0.0.pom from central
Downloading: org/clojure/tools.reader/1.3.6/tools.reader-1.3.6.pom from central
Downloading: org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.pom from central
Downloading: com/cognitect/aws/s3/822.2.1145.0/s3-822.2.1145.0.pom from central
Downloading: org/apache/commons/commons-parent/52/commons-parent-52.pom from central
Downloading: com/google/guava/guava-parent/31.1-android/guava-parent-31.1-android.pom from central
Looks like dependencies for tools.build, which includes tools.deps (not alpha)
I've got a standard clj cmd clj -A:build -X build/uberjar :lib-name mylib
, i notice in the clj --help there's init-opts, I'm a bit confused where --report=stderr
would fit in that cmd since I'd like to get the detailed report direct in stderr instead of a edn file. I tried --report=stderr
in various places, but did not seems to get the right order...
after several trials, not able to get --report work, but
clj -A:build -J-Dclojure.main.report=stderr -X build/uberjar :lib-name mylib
this is working...
--report
is a clojure.main
option so it only works with -M
and not with -X
/`-T` - which is why you need to use -J
which is a CLI script option to set the JVM property.
I'm curious why you're using -A
/`-X` here instead of -T
which is what is normally used with tools.build
per the documentation?
That's a long story, I'm experimenting build with nix using clj-nix, which seems having issue revolving deps when -T, thus I tried my luck with alternative -A -X pattern.. That's a clj-nix specific issue, otherwise I'd just use -T as per docs.
Ah, probably because the CLI version is too old. What does clojure -version
say?