tools-deps

jumar 2023-07-31T08:02:57.046549Z

I'm trying clojure -X:deps aliases but getting this error

clojure -X:deps aliases
Namespace clojure.tools.cli.api loaded but function not found: aliases
What am I doing wrong? I noticed the namespace is somewhat different from what I found on github: https://github.com/clojure/tools.deps.cli/blob/main/src/main/clojure/clojure/tools/deps/cli/api.clj

jumar 2023-07-31T08:03:38.507599Z

Commands like tree and list work, though. I found those commands here: https://clojure.org/reference/deps_and_cli#_other_programs

Alex Miller (Clojure team) 2023-07-31T08:37:58.857569Z

probably an older version of clojure?

jumar 2023-07-31T08:38:43.261139Z

This is what I've got

which clj
/usr/local/bin/clj

ll /usr/local/bin/clj
lrwxr-xr-x  1 jumar  admin    37B May 19  2022 /usr/local/bin/clj -> ../Cellar/clojure/1.11.1.1113/bin/clj

jumar 2023-07-31T08:40:27.387399Z

If I do brew upgrade

✗ brew upgrade clojure
Warning: clojure/tools/clojure 1.11.1.1113 already installed

Alex Miller (Clojure team) 2023-07-31T08:40:31.521389Z

was added in 1.11.1.1119

Alex Miller (Clojure team) 2023-07-31T08:40:51.557239Z

current version is 1.11.1.1347

jumar 2023-07-31T08:45:43.920709Z

Ok, I thought I'd been using the latest version until today. I don't know why brew upgrade clojure doesn't work so I did this:

brew install clojure/tools/clojure
Error: clojure 1.11.1.1113 is already installed
To install 1.11.1.1347, first run:
  brew unlink clojure

brew unlink clojure
Unlinking /usr/local/Cellar/clojure/1.11.1.1113... 4 symlinks removed.

brew install clojure
...

clj --version
Clojure CLI version 1.11.1.1347
Now the aliases command works.

Alex Miller (Clojure team) 2023-07-31T08:59:17.843699Z

you should be using the official Clojure tap with brew upgrade clojure/tools/clojure (but we push the same versions to homebrew-core, so what you were doing should work too)