This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-17
Channels
- # announcements (1)
- # babashka (21)
- # beginners (46)
- # calva (21)
- # cherry (10)
- # cider (5)
- # clojure (54)
- # clojure-europe (16)
- # clojure-nl (2)
- # clojure-norway (37)
- # clojure-spec (7)
- # clojure-uk (4)
- # clojurescript (30)
- # conjure (3)
- # cursive (1)
- # datalog (5)
- # datascript (3)
- # datomic (13)
- # emacs (5)
- # fulcro (82)
- # girouette (1)
- # helix (4)
- # hyperfiddle (2)
- # joyride (1)
- # juxt (1)
- # kaocha (4)
- # lambdaisland (3)
- # luminus (1)
- # malli (15)
- # off-topic (60)
- # pathom (3)
- # polylith (1)
- # practicalli (3)
- # releases (1)
- # ring (4)
- # sql (3)
- # squint (85)
Good day! I’ve been seeing this whenever I start clojure-lsp in my shadow-cljs+deps.edn project. Both classpath commands work in my terminal (integrated and standalone) and I see expected output. Also:
❯ which clojure
/opt/homebrew/bin/clojure
❯ clojure --version
Clojure CLI version 1.11.1.1149
LSP seems to be working correctly. I can jump to definition, rename symbols, etc. It does appear that references don’t update until I eval the file. For example, I see 0 references
until I go eval the other namespace, then it updates to 2 references
. Searching Slack, I can’t find anything specific to my issue.
I’m on an Apple M1 Pro macOS Monterey 12.5 and using the latest VS Code and Calva.Also, for future searches, here’s the output:
Classpath lookup failed when running `clojure -A:test:dev -Spath`. Some features may not work properly. Error: Cannot run program "clojure" (in directory "/Users/ljohnson/CODE/practice/my-project"): error=2, No such file or directory
Classpath lookup failed when running `npx shadow-cljs classpath`. Some features may not work properly. Error: shadow-cljs - config: /Users/ljohnson/CODE/practice/my-project/shadow-cljs.edn Executable 'clojure' not found on system path.
that sounds like wrong classpath indeed, could you check server logs? there is a calva command for that
yep, it seems it's not finding clojure, @U0ETXRFEW we had issues like that in the past right? do you remember how we solved it? it's related to the PATH your vscode has IIRC
❯ echo $PATH
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio
Is it homebrew vs other install? FWIW, I installed both clojure and visual-studio-code through homebrew.
In the VS Code integrated terminal but the output is the same in iTerm2
Very strange. Still might be worth testing if it makes a difference if you start VS Code from the terminal.
Interesting! When I quit everything and started VS Code by typing code
in iTerm the error didn’t come up. Now when I quit and start again normally, the error also doesn’t come up. I think that somehow fixed it?!?!
Another weird thing was with those references. I don't think we support that feature dynamically, yet you saw the count react on eval of the namespace. Do you have any idea what that could be about, @U9A1RLFNV?
I think it's from code lens, I never saw that feature on any place besides LSP, I don't think it's related to repl
It may have something to do with clojure-lsp not having analyzed the other namespace until the file is opened, but I don’t know why.
Yep, if clojure-lsp doesn' t know the source-paths or had a issue like Luke had, it won' t have the hability to scan the whole project, that' s why code lens show no references
@U02S178HM6Y If you start VS Code using the code
command from a terminal, does this problem still occur?
Sorry for the late reply! @UKFSJSM38 No, it doesn't work 😕 I am getting this error when I open the Calva repository using VSCode with Calva @U9A1RLFNV Yes, it happens even opening VSCode from Terminal I had very little time this week to understand if it causes any major trouble when developing, so in the weekend I probably will know it better