This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-22
Channels
- # announcements (6)
- # babashka (8)
- # beginners (136)
- # cider (5)
- # cljs-dev (1)
- # cljsrn (1)
- # clojure (198)
- # clojure-argentina (4)
- # clojure-australia (1)
- # clojure-europe (25)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-poland (1)
- # clojure-spec (4)
- # clojure-uk (4)
- # clojuredesign-podcast (4)
- # clojurescript (36)
- # conjure (11)
- # data-science (1)
- # datomic (6)
- # defnpodcast (1)
- # deps-new (5)
- # emacs (7)
- # events (1)
- # fulcro (10)
- # graalvm (9)
- # graalvm-mobile (10)
- # helix (9)
- # introduce-yourself (1)
- # jackdaw (1)
- # jobs-discuss (5)
- # kaocha (6)
- # lsp (10)
- # malli (11)
- # missionary (28)
- # off-topic (2)
- # pathom (24)
- # pedestal (7)
- # portal (1)
- # re-frame (12)
- # reagent (2)
- # reitit (1)
- # remote-jobs (1)
- # sci (7)
- # shadow-cljs (6)
- # sql (6)
- # tools-deps (10)
- # vim (9)
- # xtdb (19)
I have looked into making bb compatible with some of the namespaces of tools.build, most of them work, except those which depend on tools.deps.alpha (since it contains many dependencies that can't run from source with bb, like the mvn and s3 stuff).
What I noticed is that some namespaces use tools.deps.alpha but only one function from it: join-classpath
which is a pretty basic function which doesn't need any mvn/s3 stuff.
$ rg "deps/"
clojure/clojure/tools/build/tasks/compile_clj.clj
50: deps/join-classpath)
clojure/clojure/tools/build/tasks/create_basis.clj
17: "Wrapper for deps/create-basis, but ensure relative paths are resolved
30: (deps/create-basis params))))
clojure/clojure/tools/build/tasks/process.clj
93: deps/join-classpath)]
(https://github.com/clojure/tools.deps.alpha/blob/dec88af58b9e6f6e2f1949c94fbd1d93eecc5959/src/main/clojure/clojure/tools/deps/alpha.clj#L611)
In fact, it seems only the create-basis
namespace really needs tools.deps.alpha and the rest could just use join-classpath
function that could be "inlined" into tools.build itself.
This might also benefit load time if you're not going through create-basis in a build step (perhaps you already have the basis in a file somewhere for example), avoiding to load tools.deps.alpha in that case.
Just wanted to drop this thought here in case it makes sense for other use cases as well.
Another approach is to "podify" the entire tools.build library which should be possible now that there is a native version of tools.deps.alpha possible (https://github.com/babashka/babashka/issues/951).@borkdude create-basis
itself is two useful parts: the find/read/merge EDN file part (I've had variants of that to access alias data in several projects), and the dependency resolution (download/clone/etc). Only the second part needs t.d.a So it would be nice to have a small lib with just the first part -- that many tools could use, if they don't need the whole dep/res stuff.
(I'd also like to see the EDN arg parsing and require/resolve portion of clojure.run.exec
as a separate lib too -- but that's a separate discussion 🙂 )
Is there a way to force a particular minimal version of clojure CLI? I have few times run into problems where my projects failed on other people's computers because they had a too old version of the CLI 🙏
So something like :clijure-cli/min-version 1.10.3.855
in deps.edn that would trigger a warning when run with an older version of the CLI would help.
I run into that a lot too -- and have shot myself in the foot a couple of times by using a new CLI/t.d.a feature in a script and then having it fail on a server that hasn't been updated. I think it's important to recognize that we now have three "cogs" in that machine that tooling might be version-sensitive about: the CLI itself, the version of t.d.a being used, and the version of Clojure itself. Right now, the latter is controllable by specifying a minimum org.clojure/clojure
version in your project but the other two are not (and I've been bitten by both but mostly by the CLI version).
Now, the problem is that the CLI itself isn't checking deps.edn
and if the cache files are not stale will not even run the step to build the basis etc (which is what reads/analyzes deps.edn
).
Hi are there any known issues with using
:git/url
deps for private repos on Windows? I just get
Cloning: [email protected]:My/project.git
git clone
For what it's worth I had to change GIT_SSH
env var to "C:\Windows\System32\OpenSSH\ssh.exe" (it was plink before). This didn't immediately fix things but after bashing on the keyboard a bunch (not ultimately changing anything else, as far as I'm aware), things just randomly started working