Fork me on GitHub
#tools-deps
<
2022-10-24
>
Alex Miller (Clojure team)01:10:58

Clojure CLI pre-release 1.11.1.1177 is now available: • https://clojure.atlassian.net/browse/TDEPS-70 - Detect missing jar in classpath and recompute • https://clojure.atlassian.net/browse/TDEPS-232 - Add more generic posix installer • https://clojure.atlassian.net/browse/TDEPS-200 - Clean up default user deps.edn • https://clojure.atlassian.net/browse/TDEPS-219 Fixed -X:deps find-versions doesn't find Maven versions that start with a letter • Add :n option to -X:deps find-versions and default to 8 • During clojure.tools.cli.api/prep, use :exec-args of alias being prepped, if present • During clojure.tools.cli.api/prep, also prep current project if needed • Fix bad invocation of deps/prep-libs! in clojure.tools.cli.api/prep • Update deps to latest

Alex Miller (Clojure team)01:10:21

If you are an active user of -X:deps find-versions or -X:deps prep , would love to have your feedback on those If you are a user on Linux or BSD (or even Mac - but note that you will nuke your brew setup so you should know what you're doing to recover!) and wanted to try the posix installer:

curl -O 
chmod +x posix-install-1.11.1.1177.sh
sudo ./posix-install-1.11.1.1177.sh

seancorfield03:10:47

That says posix in line one and then linux in line 2&3.

seancorfield03:10:24

Also, is the linux script still there? There are various tools/installers out there which expect that name I think?

Alex Miller (Clojure team)03:10:00

Thanks, and yes this is an addition

Alex Miller (Clojure team)03:10:56

Depending on feedback I might just make them the same, but they will just be same thing under different names

borkdude09:10:40

Nice work making the linux installer compatible with macOS as well. I've been using my own tweaked script for that in CI for a while, I can finally throw that away

borkdude10:10:30

Just synced deps.clj with the newest Clojure CLI changes Without changing your local clj installation, for trying out the 1177 updates you can now also do:

curl -sLO 
clj -M deps.clj -X:deps find-versions :lib cheshire/cheshire
or replace clj -M with bb if you have babashka installed.

hlship17:10:54

I'm having an issue related to GitHub actions ... my library defines a :deps/prep (see https://github.com/pedestal/pedestal/blob/hls/08192022-deps/service/deps.edn#L41) but fails when invoked on the CI server: https://github.com/pedestal/pedestal/actions/runs/3314689356/jobs/5474302457 with Error building classpath. The following libs must be prepared before use: [current project] I've been unable to reproduce this locally, even after deleting .cpcache and ~/.m2/.repository.

hlship17:10:51

CLI version 1.11.1.1177, Clojure 1.11.1

Alex Miller (Clojure team)17:10:27

this is new in the 1177 prerelease (not a stable release yet) - the error is finding that the project itself needs prepping (prior this wouldn't require prepping)

hlship17:10:21

Feel like I'm in a chicken-or-the egg situation here; the project needs prepping but the prep command fails because the project need prepping.

Alex Miller (Clojure team)17:10:15

I'll take a look at it. you can fall back to the last stable version of CLI to get past though

Alex Miller (Clojure team)17:10:34

kind of curious if you intended to get the latest alpha of the CLI or if you accidentally got that - I just released it last night

Alex Miller (Clojure team)17:10:03

I see you have

- name: Setup Clojure
        uses: DeLaGuardo/setup-clojure@master
        with:
          cli: latest

Alex Miller (Clojure team)17:10:14

I believe using cli: 1.11.1.1165 there would drop you back

Alex Miller (Clojure team)17:10:46

and I'm guessing you can't repro locally if you're not on latest there

hlship17:10:14

Thanks; when you mentioned 1177 I though about dropping back. I'll do exactly that.

Alex Miller (Clojure team)14:10:44

I fixed this prep issue, but also made it not the default behavior, and that's in latest stable. Also, clojure-setup action now only uses stable versions (but this is now in latest stable)

Alex Miller (Clojure team)18:10:30

if you have tooling that needs to know the "latest CLI version", please start shifting to use this file which will be updated automatically to have that info: https://download.clojure.org/install/stable.properties

Alex Miller (Clojure team)18:10:02

the contents of that file are "version sha" (sha is of the clojure-tools-$version.tar.gz) For example, current contents are:

1.11.1.1165 517ba45cfe83b750a58f8246bcee569ae149d8724690f2dbc8ff3187153fe9d1 

hiredman18:10:45

user=> (doto (java.util.Properties.) (.load (.getContent (java.net.URL. ""))))
{"1.11.1.1165" "517ba45cfe83b750a58f8246bcee569ae149d8724690f2dbc8ff3187153fe9d1"}
user=>

Alex Miller (Clojure team)18:10:02

in bash...

read stable_version stable_sha < stable.properties
is useful to know

seancorfield18:10:19

Nice. I've updated our vendor script at work to check against the stable version and require an explicit flag to allow other versions to be installed, just as a sanity check.

seancorfield18:10:21

I also switched to the posix- install script and was a bit surprised to get Access Denied trying to curl the 1165 version of it (which doesn't exist) rather than a 404 (not a big deal but figured I'd mention it).

Alex Miller (Clojure team)18:10:59

maybe it's there and I'm denying you :)

😆 3
Eugen23:11:17

ok, I am also getting this error while tring to add deps for dialog lib. How do I fix it - it's not clear to me what I need to do.

Error building classpath. The following libs must be prepared before use: [amperity/dialog]

amperity/dialog {:git/url ""
                 :sha     "f00a9c9099a78415ff2188877708f98c1ae57f6b"}

Eugen23:11:14

I did upgrade to latest cli:

clj --version 
Clojure CLI version 1.11.1.1182

seancorfield00:11:06

I'm on my phone but look in the official docs for prep lib

Eugen09:11:58

hi and thanks @U064X3EF3, @U04V70XH6. I did find the docs and I tired but did not work for me. I am using polylith structure and I have the lib added as a development dependency (dev alias)

clj -X:deps prep

clj -X:deps:dev prep
Error building classpath. The following libs must be prepared before use: [amperity/dialog]
I can probably add the lib as normal dependency and run prep then - but it feels like something is missing

Eugen09:11:17

p.s. Addin the library as :deps {} works of course . Is this an issue that should be added and tracked?

Alex Miller (Clojure team)12:11:51

I don’t understand from the history here what didn’t work, so don’t know

Eugen12:11:24

adding a git lib with prep to an alias does not prep the library

Eugen12:11:19

IMO I can't supply the alias to prep command so I can prep the lib

Alex Miller (Clojure team)12:11:32

Oh, that does work, just not the way you tried it

Alex Miller (Clojure team)12:11:34

clj -X:deps prep :aliases ‘[:dev]’

Eugen12:11:30

another case of documentation :(

phronmophobic20:11:08

oh, I had the same problem yesterday.