Not sure if this goes here, I'm having an issue updating Clojure with Homebrew.
When I run brew upgrade clojure or brew upgrade clojure/tools/clojure Homebrew displays: Warning: clojure/tools/clojure 1.12.1.1550 already installed. It should be version 1.12.2.1565, correct?
If I run java -version I get
openjdk version "24.0.2" 2025-07-15
OpenJDK Runtime Environment Temurin-24.0.2+12 (build 24.0.2+12)
OpenJDK 64-Bit Server VM Temurin-24.0.2+12 (build 24.0.2+12, mixed mode, sharing)
Just to double check I entered (System/getProperty "java.version") from the REPL and it returned "24.0.1". If I run *clojure-version* from the REPL it returns {:major 1, :minor 11, :incremental 1, :qualifier nil}.brew can be weird. I usually have to uninstall Clojure and then install it again to get the latest version. Don't know why.
If you're seeing 1.11.1, it suggests you have a deps.edn with that version - the CLI version is only a default if you don't specify a Clojure version.
Thank you @seancorfield I'll take a look into deps.edn . I reinstalled Clojure but that didn't make a difference.
To be honest, at this point I just use the official posix install script instead of using brew.
Good to know. Homebrew has bit me in the bottom on several occasions.
The homebrew maintainers have "opinions" that don't really work for a lot of jvm devs ...
Just to make something more clear since it seems to be conflated in the OP.
These are all three separate and independent (almost) things:
• JDK version (`java -version`, (System/getProperty "java.version"))
• Clojure CLI tools version (`clj --version`)
• Clojure version (`*clojure-version*`)
Updating the CLI tools depends on nothing (unless the JDK version is really old) and affects nothing (unless you have no org.clojure/clojure version specified in deps.edn in the current directory or in ~/.clojure/deps.edn or in whatever else clj -Sdescribe prints out).
I second what Sean wrote, brew is simply something I avoid completely if there are other choices. It makes wrong choices in the "simple vs. simple" false dichotomy.
Great, thanks. When I have some time I'll reinstall everything sans brew. At my current skill level I doubt it makes a difference, but it will drive the obsessive/compulsive side of me crazy.
My OCD agrees!
It's such a bummer sometimes.
You mentioned using Leiningen earlier. If so, the version of Clojure in your REPL (as opened with lein repl) will depend on the version defined in project.clj, and is independent of your hoembrew packages.
Great, thanks for the tip. I'm focusing on syntax and the core library right now, but plan to dig into the Leiningen, Clojure CLI, and deps.edn docs soon.