@souenzzo That wouldn't work for code that expects to read files (from the current directory).
(and it's only stuff like src
/`test`/`resources` that are relative in path?)
@seancorfield i understand that limitation, but I still think that this transformation is useful
currently all deps looks canonical, only the :paths
items (src resources) are "relative"
Here's a trick to add the :paths
to the path as canonical versions:
clojure -Sdeps '{:deps {my/app {:local/root "."}}}' -Spath
You'll still get src
etc but you'll also get them as full paths.
clojure -Sdeps '{:deps {my/app {:local/root "."}}}' -Spath | tr ':' '\n'
src
resources
service
šIt's not quite what you want but it seems like a good workaround...?
If you want to file a question on ask.Clojure I can track it there
@souenzzo what version of the CLI are you using? That's not what I see when I run that.
1.10.2.796
Hmm,
seanc@DESKTOP-30ICA76:~/oss/honeysql$ clojure -Spath | tr : '\n'
src
/home/seanc/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar
/home/seanc/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar
/home/seanc/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar
seanc@DESKTOP-30ICA76:~/oss/honeysql$ clojure -Sdeps '{:deps {my/lib {:local/root "."}}}' -Spath | tr : '\n'
src
/home/seanc/oss/honeysql/src
/home/seanc/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar
/home/seanc/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar
/home/seanc/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar
Ok It's only duped. I will work with that local/root
hack
can confirm the pre-release fixed up my issues on M1 hardware
Thanks! Good to know
anyone else here with feedback on the CLI prereleases that shell out to git?
1.10.2.805? Seems to work on my machineā¦
Oh waitā¦ thereās a new one.
latest is 1.10.3.810
Iāll try.
thx!
I've used it pretty lightly (macOS Big Sur) -- no problems so far.
Got it: % clj --version Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Clojure CLI version 1.10.3.810
Nuked rm -rf ~/.gitlibs after installing 1.10.3.810 Seems to be downloading everything correctly when building projects. (macOS Big Sur)
:thumbsup: thx
Worked fine in my basic tests, but I donāt have too many git deps. Vendored 1.10.3.810 into the repo at work and everything still works in our dev/test/build pipeline (only one git dep there though, on Cognitectās test-runner).
@alexmiller hrm in work project if I change the sha it says it can't resolve
as in it worked the very first I tried it - but bumping a sha results in
Checking out: git@github.com:vouch-opensource/krell.git at 54944e3ef361d9d5e3ac6b6f63dd84713ef9db07
Error building classpath. Unable to checkout 54944e3ef361d9d5e3ac6b6f63dd84713ef9db07
fatal: invalid reference: 54944e3ef361d9d5e3ac6b6f63dd84713ef9db07
fwiw, it doesn't matter if it's an https or git style url
deleting ~/.gitlibs
allows me to proceed
what version are you using?
1.10.2.801 was definitely broken when using multiple shas from the same repo, but that was fixed in 1.10.2.805 and latest 1.10.3.810
but what that sounds like as I think about it more is a missed fetch - trying to resolve using a new sha that has been created since the initial clone
I'll see if I can repro
1.10.3.810
yes this is fetching a new sha after the initial clone
@dnolen bug found, and fixed, new release in the works, thx
thanks!
Clojure CLI prerelease 1.10.3.814 is now available: ā¢ fix issue with detecting when git fetch is needed for git deps
@dnolen ^^
tools.gitlibs is now so "pure Clojure" because of the shelling out, that it can be run with babashka from source :)
$ bb -cp src/main/clojure -e "(require '[clojure.tools.gitlibs :as gl]) (gl/procure \"<https://github.com/clojure/tools.gitlibs.git>\" 'org.clojure/tools.gitlibs \"11fc77496f013871c8af3514bbba03de0af28061\")"
Cloning: <https://github.com/clojure/tools.gitlibs.git>
Checking out: <https://github.com/clojure/tools.gitlibs.git> at 11fc77496f013871c8af3514bbba03de0af28061
"/Users/borkdude/.gitlibs/libs/org.clojure/tools.gitlibs/11fc77496f013871c8af3514bbba03de0af28061"
(second time: 37ms)š¤