This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-01
Channels
- # announcements (3)
- # aws (1)
- # babashka (56)
- # beginners (42)
- # calva (9)
- # cider (6)
- # circleci (5)
- # clj-kondo (17)
- # cljs-experience (1)
- # cljsjs (2)
- # clojure (106)
- # clojure-australia (1)
- # clojure-europe (36)
- # clojure-germany (5)
- # clojure-italy (13)
- # clojure-nl (14)
- # clojure-spec (19)
- # clojure-uk (27)
- # clojurescript (27)
- # cursive (20)
- # datomic (24)
- # events (2)
- # fulcro (11)
- # graalvm (1)
- # jobs (6)
- # lsp (6)
- # malli (5)
- # meander (36)
- # membrane (17)
- # nbb (4)
- # nextjournal (86)
- # off-topic (18)
- # pathom (3)
- # polylith (5)
- # portal (14)
- # rdf (5)
- # re-frame (5)
- # releases (6)
- # remote-jobs (3)
- # reveal (2)
- # ring (6)
- # shadow-cljs (171)
- # tools-deps (61)
- # vim (10)
- # xtdb (6)
hey all, I’m looking for some pointers here.. Any help appreciated: I’m looking at https://kit-clj.github.io/ , 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 1.10.3.1069
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.We don't release anything on macports so that's probably not a good install
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
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 https://github.com/clojure/homebrew-tools (eg. https://github.com/clojure/homebrew-tools/blob/master/Formula/clojure.rb) 2.
wget ""
tar xvf clojure-tools-1.10.3.1069.tar.gz
cd clojure-tools
sudo HOMEBREW_RUBY_PATH=`which ruby` ./install.sh /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
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 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
thanks @U04V70XH6, @U064X3EF3, @U7RJTCH6J!
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"...
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
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).
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 http://macports.org I’ll submit a bug report..
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 https://github.com/macports/macports-ports/blob/master/lang/clojure/Portfile and https://github.com/clojure/brew-install/blob/1.10.3/src/main/resources/clojure/install/install.sh, it seems like the only thing missing is copying tools.edn
.
I'll https://guide.macports.org/#project.github and see what happens.
better late than never: https://github.com/macports/macports-ports/pull/14016 hopefully, I followed the PR process correctly 🤞
looks like my patch is now included 🎉
$ sudo port install clojure
---> Fetching archive for clojure
---> Attempting to fetch clojure-1.10.3.1075_1.darwin_21.noarch.tbz2 from
---> Attempting to fetch clojure-1.10.3.1075_1.darwin_21.noarch.tbz2.rmd160 from
---> Installing clojure @1.10.3.1075_1
---> Deactivating clojure @1.10.3.1075_0
---> Cleaning clojure
---> Activating clojure @1.10.3.1075_1
---> 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
nice work!
thanks @U7RJTCH6J!
Amazing that this git dep works:
io.gitlab.arbetsformedlingen/taxonomy-dev/backend/jobtech-taxonomy-common {:git/tag "v1.12" :git/sha "e5556b7"}
@cfleming also would be nice if Cursive didn’t complain about symbols with multiple slashes…
symbols with multiple slashes are invalid. https://clojure.org/reference/reader
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
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...
I found there is already a thing for github versions, e.g.: https://badge.fury.io/gh/cognitect-labs%2Ftest-runner.svg
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.
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
not impossible, but it's probably a fair amount of work to get to that point
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
depending on where that's coming from above, you wouldn't see it outside your own deps.edn though
I found there is already a thing for github versions, e.g.: https://badge.fury.io/gh/cognitect-labs%2Ftest-runner.svg