deps-new

jeffparker 2020-09-18T18:13:35.000200Z

@jeffparker has joined the channel

mccraigmccraig 2020-09-18T19:53:51.000500Z

@mccraigmccraig has joined the channel

mccraigmccraig 2020-09-18T19:57:08.002500Z

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

seancorfield 2020-09-18T20:12:12.002900Z

What is your :new alias @mccraigmccraig?

mccraigmccraig 2020-09-18T20:13:19.003100Z

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

mccraigmccraig 2020-09-18T20:14:15.003400Z

also tried with

mccraigmccraig 2020-09-18T20:14:21.003700Z

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

mccraigmccraig 2020-09-18T20:16:35.005200Z

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

seancorfield 2020-09-18T20:16:51.005400Z

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

seancorfield 2020-09-18T20:17:10.005800Z

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

mccraigmccraig 2020-09-18T20:17:37.006400Z

hmm. could it be clj version related ?

seancorfield 2020-09-18T20:18:27.007500Z

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

mccraigmccraig 2020-09-18T20:19:29.009100Z

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

seancorfield 2020-09-18T20:19:54.009300Z

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)

seancorfield 2020-09-18T20:21:41.010Z

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

mccraigmccraig 2020-09-18T20:21:47.010100Z

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)

seancorfield 2020-09-18T20:22:01.010500Z

What does clojure -Sdescribe say?

mccraigmccraig 2020-09-18T20:22:34.010800Z

{: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 ""}

seancorfield 2020-09-18T20:23:34.011700Z

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

seancorfield 2020-09-18T20:24:21.012300Z

OK, try

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

seancorfield 2020-09-18T20:24:41.012600Z

oops 1.0.211

seancorfield 2020-09-18T20:25:05.013Z

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

mccraigmccraig 2020-09-18T20:25:20.013300Z

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)

seancorfield 2020-09-18T20:26:16.013800Z

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

mccraigmccraig 2020-09-18T20:26:49.014100Z

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

seancorfield 2020-09-18T20:27:34.015100Z

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

mccraigmccraig 2020-09-18T20:27:54.015700Z

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 ?

seancorfield 2020-09-18T20:30:47.016100Z

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

seancorfield 2020-09-18T20:31:05.016700Z

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

mccraigmccraig 2020-09-18T20:31:32.017400Z

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

seancorfield 2020-09-18T20:31:55.018Z

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

seancorfield 2020-09-18T20:33:54.019200Z

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.

seancorfield 2020-09-18T20:34:26.019500Z

/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

seancorfield 2020-09-18T20:34:47.019900Z

My current CLI is 1.10.1.681

mccraigmccraig 2020-09-18T20:35:23.020400Z

that -Stree command is now working fine for me too

seancorfield 2020-09-18T20:35:39.021Z

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

mccraigmccraig 2020-09-18T20:36:35.021500Z

and latest clj-new if working fine for me now too, so 🤷‍♂️

seancorfield 2020-09-18T20:37:01.021900Z

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

seancorfield 2020-09-18T20:37:46.022600Z

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 🙂

mccraigmccraig 2020-09-18T20:39:37.023100Z

if only they were more exciting 🐉 than maven 🐉

seancorfield 2020-09-18T20:47:14.023500Z

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

mccraigmccraig 2020-09-18T20:51:14.024700Z

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

mccraigmccraig 2020-09-18T20:52:39.025800Z

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

seancorfield 2020-09-18T20:56:02.026700Z

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

seancorfield 2020-09-18T20:57:34.027100Z

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.

mccraigmccraig 2020-09-18T20:58:49.027700Z

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

seancorfield 2020-09-18T20:59:04.028200Z

Any time. You know where to find me 🙂

mccraigmccraig 2020-09-18T20:59:52.028900Z

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

seancorfield 2020-09-18T21:00:25.029600Z

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

seancorfield 2020-09-18T21:01:36.031Z

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

mccraigmccraig 2020-09-18T21:05:33.032100Z

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

seancorfield 2020-09-18T21:07:23.033Z

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