tools-deps

sg-qwt 2024-01-27T08:10:37.875099Z

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...

sg-qwt 2024-01-27T08:21:32.718809Z

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...

seancorfield 2024-01-27T17:16:28.563999Z

--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.

seancorfield 2024-01-27T17:19:15.033219Z

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?

sg-qwt 2024-01-28T00:04:26.901729Z

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.

seancorfield 2024-01-28T01:43:09.587319Z

Ah, probably because the CLI version is too old. What does clojure -version say?

sg-qwt 2024-01-27T06:19:35.489279Z

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

Alex Miller (Clojure team) 2024-01-27T06:23:41.547699Z

Looks like dependencies for tools.build, which includes tools.deps (not alpha)

✅ 1
sg-qwt 2024-01-27T06:30:35.958009Z

Indeed it's from tools.build, I thought it comes from somewhere else. Tx!