Fork me on GitHub
#cursive
<
2022-10-30
>
tskardal10:10:11

When starting cursive I get this error:

com.intellij.execution.ExecutionException: Cannot execute: Could not find :version in command output when executing /usr/local/bin/clojure
And I get zero results when searching for this error message 😬 – any suggestions?

cfleming02:10:06

I can’t reproduce this, sorry. What do you get if you run clojure -Sdescribe?

tskardal05:10:18

No worries 🙂 Here’s the output:

❯ clojure -Sdescribe
{ version "1.11.1.1182"
  config-files ["/usr/local/Cellar/clojure/1.11.1.1182/deps.edn" "/Users/thomas/.clojure/deps.edn" ]
  config-user "/Users/thomas/.clojure/deps.edn"
  config-project "deps.edn"
  install-dir "/usr/local/Cellar/clojure/1.11.1.1182"
  config-dir "/Users/thomas/.clojure"
  cache-dir "/Users/thomas/.clojure/.cpcache"
  force false
  repro false
  main-aliases ""
  repl-aliases ""}

cfleming05:10:24

Here’s what I see:

~/d/cursive (master)> clojure -Sdescribe
{:version "1.11.1.1182"
 :config-files ["/opt/homebrew/Cellar/clojure/1.11.1.1182/deps.edn" "/Users/colin/.clojure/deps.edn" "deps.edn" ]
 :config-user "/Users/colin/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/opt/homebrew/Cellar/clojure/1.11.1.1182"
 :config-dir "/Users/colin/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}

cfleming05:10:05

See how your keys are symbols rather than keywords? I think that’s the problem, but I have no idea why that would happen.

cfleming05:10:57

If you’re not sure why that might be happening, it would be worth asking over in #C6QH853H8

onetom07:10:44

@U06DX1ANS i would probably upgrade or reinstall homebrew, because that's a bit suspicious, that your built-in deps.edn file is under /usr/local/ and not under /usr/homebrew/. alternatively, i'd recommend using Nix instead of homebrew for managing non-GUI apps, because it yields in more reproducible environments. u can even have multiple environments side-by-side, without affecting each other and it's also completely isolated from your homebrew installation or the built-in macOS programs. just install with

sh <(curl -L ) --daemon
as described in https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation (the install script explains very precisely what it will do and why) then, in a newly opened terminal window, either try clojure temporarily with:
nix-shell -p clojure
which will downloads Clojure CLI tools for the 1st time, then starts a new bash shell, where clojure is on your PATH:
[nix-shell:~]$ clojure -Sdescribe
{:version "1.11.1.1177"
 :config-files ["/nix/store/q6sxn9lcb5rj5b7rhrwqsk9p8fhr63xp-clojure-1.11.1.1177/deps.edn" "/Users/onetom/.clojure/deps.edn" ]
 :config-user "/Users/onetom/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/nix/store/q6sxn9lcb5rj5b7rhrwqsk9p8fhr63xp-clojure-1.11.1.1177"
 :config-dir "/Users/onetom/.clojure"
 :cache-dir "/Users/onetom/.clojure/.cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}
or you can install it in a way, that's it's always available for your user:
nix-env -iA nixpkgs.clojure
then remove with
nix-env -e clojure
in case u want the homebrew version found first on your PATH again.

cfleming09:10:29

IIRC (it’s been a while) I think brew on Intel installs binaries, at least, to /usr/local. I might be wrong on that, though.

tskardal19:10:22

yes, symlinks are put in /usr/local/bin

tskardal19:10:29

I’ve been using nix too, but not on macOS 🙂

tskardal19:11:26

FYI, the problem was that I was using the default bash on macOS. The script behaves differently on a more recent one. https://clojure.atlassian.net/browse/TDEPS-233

👍 1
cfleming22:11:33

Glad you found the answer! That was very weird indeed.

tskardal12:10:00

I’ve tried both stable and EAP. This is macOS btw.

❯ clojure --version
Clojure CLI version 1.11.1.1182
❯ which clojure
/usr/local/bin/clojure