tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
alexmiller 2021-03-10T07:16:59.210200Z

Clojure CLI 1.10.2.805 prerelease is now available: • Fixed git checkout implementation (issues when using multiple commits from the same repo). If you have been using prerelease 1.10.2.801 for git deps, you should update and rm -rf ~/.gitlibs • Resolution of commits now only fetches if it can't resolve, which reduces network use and improves performance • When using the CLI, if your git command is not on the path as git for some reason, you can set GITLIBS_COMMAND env var ◦ If using tools.deps.alpha / tools.gitlibs directly, you can also use the Java system properties clojure.gitlibs.dir and clojure.gitlibs.command (these take precedence over the env vars). • Fix reflection error in tools.gitlibs • Updated tools.cli, and com.cognitect.aws libs (notably moves transitive deps org.eclipse.jetty/jetty-* to 9.4.36.v20210114)

👍 2
💯 4
seancorfield 2021-03-10T17:53:20.231800Z

@alexmiller Given that 1.10.3 is available, should the CLI move to 1.10.3.x or will that happen just with the next stable CLI version?

alexmiller 2021-03-10T18:50:44.234200Z

I will get there when this stabilizes

1
raspasov 2021-03-10T07:42:22.210300Z

Is the brew version still pending? brew install clojure/tools/clojure … still fetches 1.10.2.796 (I believe)

raspasov 2021-03-10T07:43:35.210700Z

Actually managed to get it via: brew install clojure/tools/clojure@1.10.2.805

dharrigan 2021-03-10T08:12:25.211Z

Is there a link?

dharrigan 2021-03-10T08:18:00.211500Z

Ah, it's still showing as pre-release on github and <https://clojure.org/releases/tools> not updated yet.

flowthing 2021-03-10T08:25:12.211600Z

Yeah, it's a pre-release. See https://github.com/clojure/homebrew-tools#version-archive-tool-releases

dharrigan 2021-03-10T08:26:08.211900Z

It's not announced as a pre-release

dharrigan 2021-03-10T08:26:22.212100Z

In both here, and in #releases, no tag to say it's still a pre-release.

flowthing 2021-03-10T08:26:29.212300Z

No, but I think that's a mistake.

dharrigan 2021-03-10T08:26:35.212600Z

Right.

dharrigan 2021-03-10T08:26:52.212800Z

I was about to flag the package as out-of-date on Arch so that it can be updated. Good thing I checked...

borkdude 2021-03-10T12:58:21.213800Z

Upgraded to 805. I'm getting: Error building classpath. Manifest type not detected when finding deps for cognitect/test-runner in coordinate {:git/url "https://github.com/cognitect-labs/test-runner", :sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"} for the test runner. https://app.circleci.com/pipelines/github/babashka/babashka-sql-pods/149/workflows/66d08efe-6975-4567-a00b-fc1317282348/jobs/751

borkdude 2021-03-10T13:02:06.214500Z

Cloning: <https://github.com/cognitect-labs/test-runner>
Checking out: <https://github.com/cognitect-labs/test-runner> at cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b
Cloning: <https://github.com/babashka/babashka.pods>
Checking out: <https://github.com/babashka/babashka.pods> at a033bccaf0024b279480f2a7ac4b446621629b73
Error building classpath. Manifest type not detected when finding deps for cognitect/test-runner in coordinate {:git/url "<https://github.com/cognitect-labs/test-runner>", :sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"}
I'm now logged in with ssh. Yay CircleCI. I can debug.

borkdude 2021-03-10T13:02:30.214700Z

$ ls ~/.gitlibs/_repos/github.com/cognitect-labs/test-runner/
HEAD  branches  config  description  hooks  info  objects  packed-refs  refs

borkdude 2021-03-10T13:02:50.214900Z

Just tell me what you want to know @alexmiller

borkdude 2021-03-10T13:03:23.215200Z

This is a build which does not cache gitlibs, so it's cloned from afresh.

borkdude 2021-03-10T13:04:42.215500Z

-Sforce doesn't help either:

$ clojure -Sforce -M:test
Checking out: <https://github.com/cognitect-labs/test-runner> at cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b
Checking out: <https://github.com/babashka/babashka.pods> at a033bccaf0024b279480f2a7ac4b446621629b73
Error building classpath. Manifest type not detected when finding deps for cognitect/test-runner in coordinate {:git/url "<https://github.com/cognitect-labs/test-runner>", :sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"}

borkdude 2021-03-10T13:05:14.215800Z

Moving gitlibs aside didn't work either, same error.

alexmiller 2021-03-10T13:10:39.216300Z

It’s a prerelease, sorry

dharrigan 2021-03-10T13:10:58.216500Z

np 🙂

alexmiller 2021-03-10T13:12:47.217100Z

What’s in the libs dirs?

borkdude 2021-03-10T13:13:28.217500Z

fwiw, I checked with 796 in a different branch and builds ok over there.

borkdude 2021-03-10T13:14:18.217800Z

circleci@702affae6f8c:~/repo$ find ~/.gitlibs
/home/circleci/.gitlibs
/home/circleci/.gitlibs/_repos
/home/circleci/.gitlibs/_repos/github.com
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/branches
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/description
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/applypatch-msg.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/commit-msg.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/post-update.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/pre-applypatch.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/pre-commit.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/pre-push.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/pre-rebase.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/pre-receive.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/prepare-commit-msg.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/hooks/update.sample
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/info
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/info/exclude
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/refs
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/refs/heads
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/refs/tags
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/HEAD
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/config
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/objects
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/objects/pack
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/objects/pack/pack-23abcb662426c523d54342d3836e0a897c01cb68.pack
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/objects/pack/pack-23abcb662426c523d54342d3836e0a897c01cb68.idx
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/objects/info
/home/circleci/.gitlibs/_repos/github.com/cognitect-labs/test-runner/packed-refs
/home/circleci/.gitlibs/_repos/github.com/babashka
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/branches
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/description
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/applypatch-msg.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/commit-msg.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/post-update.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/pre-applypatch.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/pre-commit.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/pre-push.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/pre-rebase.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/pre-receive.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/prepare-commit-msg.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/hooks/update.sample
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/info
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/info/exclude
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/refs
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/refs/heads
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/refs/tags
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/HEAD
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/config
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/objects
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/objects/pack
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/objects/pack/pack-6f8bab224fca93b17e1917922c4a19048cf98d7e.pack
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/objects/pack/pack-6f8bab224fca93b17e1917922c4a19048cf98d7e.idx
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/objects/info
/home/circleci/.gitlibs/_repos/github.com/babashka/babashka.pods/packed-refs

borkdude 2021-03-10T13:14:18.218Z

borkdude 2021-03-10T13:16:49.218600Z

fwiw, on my local system (macOS) it builds fine with 805

alexmiller 2021-03-10T13:17:02.219Z

I mean under .gitlibs/libs

borkdude 2021-03-10T13:17:27.219300Z

Nothing, it doesn't exist

alexmiller 2021-03-10T13:17:53.219700Z

Well that seems bad :)

borkdude 2021-03-10T13:18:09.219900Z

Maybe it is related to that circleci git config. I tried to move that aside as well, but to no avail.

borkdude 2021-03-10T13:18:52.220200Z

I can add your public key to this build if you want, then you can check yourself

borkdude 2021-03-10T13:20:44.221300Z

or you can clone my project + branch and build it yourself

alexmiller 2021-03-10T13:21:34.222300Z

Probably easiest to start there

alexmiller 2021-03-10T13:22:19.222800Z

Can you check the git version in ci

borkdude 2021-03-10T13:22:38.223Z

$ git --version
git version 2.11.0

borkdude 2021-03-10T13:23:02.223200Z

is that too old?

borkdude 2021-03-10T13:23:29.223400Z

I can upgrade if that helps

borkdude 2021-03-10T13:25:40.223600Z

I am using the circleci/clojure:lein-2.8.1 image

alexmiller 2021-03-10T13:26:35.224800Z

I need to expose a couple of the things I’ve been using to debug, should have done that in this release

borkdude 2021-03-10T13:30:44.225200Z

I think you should be able to reproduce this with the mentioned Docker image.

borkdude 2021-03-10T13:31:04.225400Z

Let me try to make a small repro

borkdude 2021-03-10T13:40:05.226Z

Btw, I would be happy to upgrade my builds if needed to newer images, I just didn't do so because of laziness

alexmiller 2021-03-10T14:04:53.226200Z

no need, just wanted to know

alexmiller 2021-03-10T14:05:15.226400Z

thx for the repro, will take a look

alexmiller 2021-03-10T15:26:38.229400Z

@borkdude turns out, it is related to git version. I'm using a --quiet option that was added in git 2.19 (I think), but I've removed it for the next release as it doesn't matter, and with that change your existing repro works. I think our minimum git version is probably 2.5.

alexmiller 2021-03-10T15:28:05.230100Z

I will get a new release out at some point today, want to hook up the debugging stuff and include that too so that's available

borkdude 2021-03-10T15:28:49.230700Z

@alexmiller maybe propagate the git stderr to the parent process' stderr so you can see this?

alexmiller 2021-03-10T15:29:21.230900Z

yeah, that's part of it

borkdude 2021-03-10T15:29:33.231300Z

cool, thanks for looking into it

alexmiller 2021-03-10T15:29:50.231700Z

just trying to hook this stuff up to tools.deps etc in a good way

markaddleman 2021-03-10T18:27:12.234Z

Should ~/.gitlibs directory be listed as part of clj -Sdescribe ? I recently ran into a problem where the downloaded library was somehow corrupted. Deleting ~/.gitlibs fixed the problem but it took me a while to discover that the directory existed in the first place.

➕ 1
alexmiller 2021-03-10T20:40:39.234600Z

could do

alexmiller 2021-03-10T20:40:41.234800Z

Clojure CLI 1.10.3.810 prerelease is now available • Removed use of git option only available on newer gits to work with broader version range (git ≥ 2.5) • Check exit code on git dep checkout and throw with the git error • Overhauled configuration and option implementations for gitlibs, will write this up more for stable release, stuff from last release all still works • Use Clojure 1.10.3 as default Clojure version (as always, you can use any version of Clojure with any version of the Clojure CLI)

2
seancorfield 2021-03-10T20:51:46.235300Z

Thank you! I'll update my dev env as soon as my current test suite run finishes 🙂

seancorfield 2021-03-10T21:10:24.236700Z

Seems to work fine for my relatively simple use case (although, after rm -rf ~/.gitlibs, I forgot I needed -Sforce to refresh the cache since .cpcache still referred to the now-missing .gitlibs path).

alexmiller 2021-03-10T21:20:39.237100Z

hey, don't forget to -Sforce! :)

alexmiller 2021-03-10T21:21:05.237400Z

maybe it's time to actually solve that problem :)