tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
alexmiller 2020-11-22T17:46:32.024900Z

Note that -X:deps mvn-pom is not affected by changes in the classpath used to run it (so using the :versions alias with it won't affect the pom that is generated). This differs from -Spom which does work from the classpath you're choosing via clj. We are still debating the best way to supply a set of classpath-modifying options to mvn-pom (and other programs like tree).

alexmiller 2020-11-22T17:49:40.025100Z

I wasn't able to repro the error you show above with that or with variants. The code you point to should only be happening if a coord can't be resolved so that's too probably too late to be fixing this error, but I'd like to have a good repro first

alexmiller 2020-11-22T17:51:38.025300Z

also btw, mvn-pom does not take a :lib argument, I'm curious how you got the idea it did

borkdude 2020-11-22T18:33:50.025500Z

@alexmiller Tried this again.

borkdude@MBP2019 /tmp $ clojure -A:versions -X:deps mvn-pom
Error generating pom manifest: Bad coordinate for library clj-kondo/clj-kondo, expected map: nil
borkdude@MBP2019 /tmp $ clojure -Sdescribe
{:version "1.10.1.727"
 :config-files ["/usr/local/Cellar/clojure/1.10.1.727/deps.edn" "/Users/borkdude/.clojure/deps.edn" "deps.edn" ]
 :config-user "/Users/borkdude/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/usr/local/Cellar/clojure/1.10.1.727"
 :config-dir "/Users/borkdude/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}
borkdude@MBP2019 /tmp $ cat deps.edn
{:aliases {:versions {:default-deps {clj-kondo/clj-kondo {:mvn/version "2020.10.10"}}}}
 :deps {clj-kondo/clj-kondo nil}}

borkdude 2020-11-22T18:34:08.025700Z

I don't know where the :lib argument came from. This was written by a colleague who went with vacation and this blocked our deploy.

borkdude 2020-11-22T18:35:01.025900Z

fwiw @seancorfield also has said he has the exact same problem at his job

borkdude 2020-11-22T19:08:14.026100Z

Same with -Srepro:

$ clojure -Srepro -A:versions -X:deps mvn-pom
Error generating pom manifest: Bad coordinate for library clj-kondo/clj-kondo, expected map: nil

alexmiller 2020-11-22T22:24:30.026300Z

thx, that repros for me

alexmiller 2020-11-22T22:53:32.026600Z

so this is exactly what I said above - the :versions alias affects the classpath of the mvn-pom program, but is not used when computing the pom deps (only the project deps.edn is used for that), and yes that's the same issue Sean has. as he said, clj -Spom works differently and that's the recommended path right now.

borkdude 2020-11-22T22:59:41.026800Z

alright, thanks