Fork me on GitHub
#deps-new
<
2020-09-18
>
mccraigmccraig19:09:08

i'm getting an error with clj -A:new -M:new lib mccraigmccraig/blah... Error building classpath. Could not transfer artifact org.codehaus.plexus:plexus-utils:jar:3.2.1 from/to central (): Range Not Satisfiable (416) does that sound familiar to anyone ? any clues on how to debug it ? i'm a complete clj-new n00b, so could easily be rookie error

seancorfield20:09:12

What is your :new alias @mccraigmccraig?

mccraigmccraig20:09:19

{:extra-deps {seancorfield/clj-new {:mvn/version "1.0.211"}}
   :main-opts  ["-m" "clj-new.create"]}

mccraigmccraig20:09:15

also tried with

mccraigmccraig20:09:21

{:new {:extra-deps {seancorfield/clj-new
                         {:mvn/version "1.1.216"}}
            :main-opts ["-m" "clj-new.create"]}}

mccraigmccraig20:09:35

actually, 1.1.216 was the version that gave me the error above... then i started casting around and had a go with the version from practically/clojure-deps.edn which is 1.0.211

seancorfield20:09:51

I've never seen that error before -- and it's just a dependency fetching failure inside Clojure/tools.deps.alpha

seancorfield20:09:10

It's not specific to clj-new beyond trying to pull in dependencies.

mccraigmccraig20:09:37

hmm. could it be clj version related ?

seancorfield20:09:27

I don't know what pulls in the plexus utils JAR. Something deep in Leiningen I suspect (since clj-new handles Leiningen templates by reusing some Leiningen code).

mccraigmccraig20:09:29

wow, looking at the plexus homepage and wondering why on earth that's getting pulled in

seancorfield20:09:54

I would try rm -rf ~/.m2/repository/org/codehaus/plexus and then try clojure -Sforce -Sdeps '{:deps {seancorfield/clj-new {:mvn/version "1.1.216"}}}' (which is the latest version)

seancorfield20:09:41

Ah, it's a dependency of org.clojure/tools.deps.alpha -- because that depends on maven-core which in turn depends on plexus-utils

mccraigmccraig20:09:47

huh, well now i get Error building classpath. Could not transfer artifact org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.4 from/to central (): Range Not Satisfiable (416)

seancorfield20:09:01

What does clojure -Sdescribe say?

mccraigmccraig20:09:34

{:version "1.10.1.561"
 :config-files ["/usr/local/Cellar/clojure/1.10.1.561/deps.edn" "/Users/mccraig/.clojure/deps.edn" ]
 :config-user "/Users/mccraig/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/usr/local/Cellar/clojure/1.10.1.561"
 :config-dir "/Users/mccraig/.clojure"
 :cache-dir "/Users/mccraig/.clojure/.cpcache"
 :force false
 :repro false
 :resolve-aliases ""
 :classpath-aliases ""
 :jvm-aliases ""
 :main-aliases ""
 :all-aliases ""}

seancorfield20:09:34

You're on the stable CLI. I wonder if the problem is that the latest clj-new depends on a newer t.d.a.?

seancorfield20:09:21

OK, try

clojure -Sforce -Sdeps '{:deps {seancorfield/clj-new {:mvn/version "1.0.211"}}}'
and see if that works

seancorfield20:09:05

That version still uses the older t.d.a.

mccraigmccraig20:09:20

nope... still getting Error building classpath. Could not transfer artifact org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.4 from/to central (): Range Not Satisfiable (416)

seancorfield20:09:16

rm -rf ~/.m2/repository/org/eclipse/sisu and try it again.

mccraigmccraig20:09:49

now we're getting somewhere... that gives me a repl

seancorfield20:09:34

OK, so that's cleaned things out. You should be able to create a new lib/app with 1.0.211 now.

mccraigmccraig20:09:54

is that a common thing to have to do, removing things from ~/.m2 ... i don't recall ever needing to do that with lein or boot ?

seancorfield20:09:47

Only needed because Maven messed up fetching artifacts under the hood.

seancorfield20:09:05

I've had to do it with lein and with boot over the years.

mccraigmccraig20:09:32

ok, cool - i've got a new project now - thanks @seancorfield!

seancorfield20:09:55

Strange that conflicting t.d.a. versions caused that error since both t.d.a. versions bring in the exact same versions of that part of the tree...

seancorfield20:09:54

And I can't reproduce your issue when I use the stable CLI and the very latest clj-new (which forces the newer t.d.a into the mix)... so I've no idea what caused your issue but I suspect it's more a Maven/t.d.a thing that anything else.

seancorfield20:09:26

/usr/local/Cellar/clojure/1.10.1.561/bin/clojure -Sforce -Sdeps '{:deps {seancorfield/clj-new {:mvn/version "1.1.216"}}}' -Stree
That works fine for me

seancorfield20:09:47

My current CLI is 1.10.1.681

mccraigmccraig20:09:23

that -Stree command is now working fine for me too

seancorfield20:09:39

Yes, I was just using that to verify versions being downloaded.

mccraigmccraig20:09:35

and latest clj-new if working fine for me now too, so :man-shrugging:

seancorfield20:09:01

Almost certainly a Maven-related glitch then. "Here be dragons"

seancorfield20:09:46

I was fairly certain I'd tested the latest clj-new on the stable CLI before making a release, so that's good to know you have it working now 🙂

mccraigmccraig20:09:37

if only they were more exciting 🐉 than maven 🐉

seancorfield20:09:14

So are you just getting started with the CLI / deps.edn stuff?

mccraigmccraig20:09:14

yep, i've got a couple of hours with nobody around so i thought i'd have a hack on some new stuff, and while i'm at it i might as well use the opportunity to have a go with deps.edn

mccraigmccraig20:09:39

i'll probably want to move the day-job stuff over to deps.edn at some point, but that's a complex multi-module build in a monorepo so i probably want to have some idea of what i'm doing before i try that

seancorfield20:09:02

Happy to chat about that (on channel or via DM) since we have a huge monorepo with three dozen subprojects that we have moved from lein to boot and then to CLI/`deps.edn` @mccraigmccraig

seancorfield20:09:34

Well, "huge" is "around 100k lines"

Clojure build/config 61 files 1082 total loc
Clojure source 329 files 81251 total loc,
    3364 fns, 838 of which are private,
    504 vars, 28 macros, 89 atoms,
    655 specs, 33 function specs.
Clojure tests 359 files 22680 total loc,
    4 specs, 1 function specs.

mccraigmccraig20:09:49

thanks @seancorfield - i'll probably take you up on that once i have some idea of the landscape

seancorfield20:09:04

Any time. You know where to find me 🙂

mccraigmccraig20:09:52

our app is probably a similar amount of clojure, but with a clojurescript front end thrown in too

seancorfield21:09:25

Ah, we have zero ClojureScript right now. But we're talking about using it on the next front end app we build... maybe...

seancorfield21:09:36

Our last experiment with cljs was 2014/2015 just after Reagent appeared and we tried Om and then Reagent but decided it really wasn't ready for production usage back then (fragile and fast-changing tooling, lots of annoying differences between clj and cljs, etc).

mccraigmccraig21:09:33

it's pretty good these days - much more robust tooling. shadow certainly seems to help

seancorfield21:09:23

Yup, I started working through Yogthos' Web Development book (3rd ed) and it seems night and day compared to my previous experience.