beginners

Ryan A 2025-08-30T21:10:13.735929Z

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}.

seancorfield 2025-08-30T21:16:36.346529Z

brew can be weird. I usually have to uninstall Clojure and then install it again to get the latest version. Don't know why.

seancorfield 2025-08-30T21:18:03.551229Z

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.

Ryan A 2025-08-30T21:27:37.118659Z

Thank you @seancorfield I'll take a look into deps.edn . I reinstalled Clojure but that didn't make a difference.

seancorfield 2025-08-30T21:29:24.139149Z

To be honest, at this point I just use the official posix install script instead of using brew.

Ryan A 2025-08-30T21:33:51.680089Z

Good to know. Homebrew has bit me in the bottom on several occasions.

seancorfield 2025-08-30T21:34:47.591249Z

The homebrew maintainers have "opinions" that don't really work for a lot of jvm devs ...

p-himik 2025-08-30T21:54:45.238079Z

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.

Ryan A 2025-08-30T22:06:44.682129Z

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.

seancorfield 2025-08-30T22:07:18.189869Z

My OCD agrees!

Ryan A 2025-08-30T22:09:08.288279Z

It's such a bummer sometimes.

gaverhae 2025-09-01T14:16:28.933839Z

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.

Ryan A 2025-09-01T14:52:28.476779Z

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.