Fork me on GitHub

hey all, I’m looking for some pointers here.. Any help appreciated: I’m looking at , and want to use the 2 commands on this page:

clojure -Ttools install com.github.seancorfield/clj-new '{:git/tag "v1.2.381"}' :as new
    clojure -Tnew create :template io.github.kit-clj :name yourname/guestbook
This is what I get with the first one:
clojure -Ttools install com.github.seancorfield/clj-new '{:git/tag "v1.2.381"}' :as new
Error building classpath. Unknown tool: tools
 clojure --version
Clojure CLI version
I’m definitely on the latest… not sure what I did wrong. I swear I ran these 2 commands a few weeks ago when kit was first announced, deleted the folder, trying again now.. I’m on macos 12.3 (beta), but behavior is the same on 12.2 (not beta). clojure is installed from MacPorts.

Alex Miller (Clojure team)03:02:36

We don't release anything on macports so that's probably not a good install

Alex Miller (Clojure team)03:02:38

The brew install will copy in the tools definition to -/.clojure/tools/tools.edn


FWIW someone showed the guix Clojure CLI installer and that's also missing the tools stuff. I think these installers were based on pre-tools CLI and they are do custom installs of specific files and they seem to update the JAR version but don't revisit the actual files in more recent versions. The GitHub Actions installer was like that until the author reverted to using the official Linux installer to set things up. That's why these unofficial installers are really problematic 😞 @patrix

Alex Miller (Clojure team)14:02:56

I would like to make the Linux installer work seamlessly on Mac too (I don't think it does right now)


that would all make sense, then.. I don’t have brew on my Macs because it annoys me 😉 I’ve managed to find the tools.edn and copy it to my ~/.clojure/tools, and it does appear to work now. And I’ve checked in the macports install, no tools.edn there… 😞 thanks for all the info! I probably should submit a bug to macports or something…


I'm also on macports 😕 Here's the process I ended up using in case it's helpful: 1. Find url from (eg. 2.

wget ""
tar xvf clojure-tools- 
cd clojure-tools
sudo HOMEBREW_RUBY_PATH=`which ruby` ./ /usr/local


oh, I tested it just now and seems to work: I extracted the tools.dep from that file and put it in /opt/local/lib/clojure


it probably won’t persist the next time macports updates clojure, we’ll see..


yea, the method I used puts clojure outside of macport's management


I'd rather macports be completely in charge of the dependency or do it myself rather than trying to share responsibility for the install.


FWIW, I ended up using brew on macOS (despite its quirks) and then linuxbrew on Windows/WSL2 so I at least have the official Clojure tap/install going on. I don't use brew for anything else.


That way I can easily upgrade stable releases any time and I can also easily install any specific version (I have dozens of versions installed on both macOS and Ubuntu so I can run regression tests).


I would love to use an officially supported install method, but as far as I can tell, homebrew and macports are incompatible


As problematic as Homebrew can be, I've had far worse problems with MacPorts over the years, TBH. Hence why I stick to Homebrew just for Clojure.


(and I don't use MacPorts for anything at all)


I guess mileage does vary..


I use macports for lots of things and it's non-trivial to switch. At some point, I looked into whether it would be worth switching and found that homebrew wouldn't work for me 🤷


I was in the middle of fixing a production issue and needed to install a piece of software - everything else related, I had installed with brew. brew install xxxxxx ended up updating half my packages because of one minor python update, wasting valuable time.. that very same day I switched to macports


anyway for now having tools.edn in /opt/local/lib/clojure and in ~/.clojure/tools/ will work


Yeah, I def. wouldn't install stuff generally with brew -- their belief that everything should always depend on the very latest version of every package is just insanity. IMO.


It's why Alex switched to a Clojure-specific tap and removed the dependency on the JDK (because brew would "helpfully" install whatever it thought was the latest JDK and override your chosen installation).


Aside from apt, I don't rely on package managers for anything normally. The maintainers often have very peculiar ideas about "how the world should be"...


ah makes sense why clojure is using a tap in brew, indeed


yeah more and more I just want to run things in Docker, as much as I dislike it, just to avoid packagers assuming a million things about my system. But that brings its own pains


especially on a Mac haha


I run Docker (on both my Mac and on Windows/WSL2) to provide Percona, Elastic Search (two instances), and Redis -- but I always run Clojure on the bare metal.


But I only develop in Clojure so I have no need of anything but a JDK installed (well, I have several versions, but JAVA_HOME controls those).


Makes sense lol

Alex Miller (Clojure team)14:02:58

Presumably someone did some work on macports for Clojure to be available at all there and it could be updated to work


Yes I suppose so, soon as I convince myself to create a Trac account on I’ll submit a bug report..

Ben Sless08:02:14

Nix / guix support?


I'm embarrassed to say that I hadn't considered trying to submit a patch to the clojure Port for macports. It's been updated fairly recently. Just manually comparing the and, it seems like the only thing missing is copying tools.edn. I'll and see what happens.


better late than never: hopefully, I followed the PR process correctly 🤞

🙌 1

looks like my patch is now included 🎉

$ sudo port install clojure
--->  Fetching archive for clojure
--->  Attempting to fetch clojure- from 
--->  Attempting to fetch clojure- from 
--->  Installing clojure @
--->  Deactivating clojure @
--->  Cleaning clojure
--->  Activating clojure @
--->  Cleaning clojure
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.
--->  Some of the ports you installed have notes:
  clojure has the following notes:
    Install the rlwrap port and invoke `clj` for more a more ergonomic REPL.
$ ls /opt/local/lib/clojure/
deps.edn          example-deps.edn  libexec/          tools.edn         
$ rm ~/.clojure/tools/*
$ clojure -Sforce -Ttools install com.github.seancorfield/clj-new '{:git/tag "v1.2.381"}' :as new
Installed new
$ ls ~/.clojure/tools/
new.edn    tools.edn  


Amazing that this git dep works:

io.gitlab.arbetsformedlingen/taxonomy-dev/backend/jobtech-taxonomy-common {:git/tag "v1.12" :git/sha "e5556b7"}


can I rely on that, or should I specify :git/url and use saner lib name?


@cfleming also would be nice if Cursive didn’t complain about symbols with multiple slashes…


Is that even a thing? I didn’t think that was legal.


Actually, I just read the rest of the conversation, never mind…


symbols with multiple slashes are invalid.

Alex Miller (Clojure team)14:02:36

I would not rely on that and use a git url instead


I think there was some law of someone that states that with time all observable behaviors of a dependency/system will be relied upon


That’s the law of anyone developing tooling.



✔️ 2

Wouldn't it be nice to have svg "shields"/"badges" for readmes that show latest git dep versions? Shame that GitHub doesn't allow selecting text in these svgs...


Q: Is there a reason why the tools can't identify the source/line/column of errors, e.g.:

~/workspaces/walmart/push-services/push-load-test-service > clj -X:dev:test
Error building classpath. Coord of unknown type: {}


It would helpful if it said "In file deps.edn, line 18" or something, especially if it's from a deps.edn from a dependency.

Alex Miller (Clojure team)20:02:28

the point where that is detected is many steps away from when the deps is read (and may not even be from a file), and has already gone through multiple steps of merging/manipulation

Alex Miller (Clojure team)20:02:12

not impossible, but it's probably a fair amount of work to get to that point

Alex Miller (Clojure team)20:02:45

would probably be easier to catch with more validation during the read


clj-kondo does offer linting for deps.edn - feel free to suggest more checks in #clj-kondo @hlship


it already lints that example:

Alex Miller (Clojure team)23:02:16

depending on where that's coming from above, you wouldn't see it outside your own deps.edn though