Fork me on GitHub
#calva
<
2020-09-28
>
il-tmfv07:09:44

Hi! For some reason I started to see this error when jacking-in:

> Executing task: clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.23.0"} clj-kondo {:mvn/version "2020.04.05"}}}' -A:dev <

zsh:1: command not found: clojure
The terminal process "/bin/zsh '-c', 'clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.23.0"} clj-kondo {:mvn/version "2020.04.05"}}}' -A:dev'" failed to launch (exit code: 127).

Terminal will be reused by tasks, press any key to close it.
100% sure it is not calva-related issue b/c if I start vscode via code . or run Developer: Reload window then it works ok. Just curious if I’m the only one here who is facing this. PS I’m using macos.

sogaiu07:09:48

iiuc what is happening is roughly the following...

sogaiu07:09:30

when you start vscode via the dock, the PATH env var value doesn't contain the path to the directory where the file "clojure" lives

sogaiu07:09:46

when you start from the terminal, the PATH env var does have the relevant path

sogaiu07:09:48

does it make sense?

borkdude07:09:12

to me, yes. GUI apps generally don't interact with env vars the way shells do

il-tmfv07:09:37

yeah, understandable but it started only today) previously used alfred to start vscode and everything was ok

sogaiu07:09:25

i have not tried any of that fwiw

borkdude08:09:12

why not just start code from alfred within a shell? @il.tmfv That would be: > code &; exit 0

borkdude08:09:15

or something similar

borkdude08:09:23

you can also make an Alfred specialized command for this

il-tmfv08:09:29

Also it is a bit strange that Developer: Reload window command helps https://github.com/microsoft/vscode/issues/107169 looks like i’m not the only one

il-tmfv08:09:48

thanks, I always have iterm opened, so typing code . is ok

sogaiu08:09:58

the lone comment in that issue is surprising: > There is something in your .zshrc which prevents VS Code from loading it in order to set the correct env. i wonder if that's really the case.

sogaiu08:09:34

so vscode analyzes one's .zshrc?

il-tmfv08:09:37

i haven’t changed this file maybe the recent macos security update changed things

sogaiu08:09:58

it's hard to tell...perhaps so

pez10:09:32

I’ve heard about it just starting to happen like that before.

fadrian16:09:17

I'm using Calva and I've run into an error. I have a form in my file that I've annotated with a #dbg tag:

#dbg
(let [schema (with-open
              [schema* (io/input-stream "resources\\tests\\testSchema.xsd")]
              (cxs/read-schema schema*))
_ (pprint schema)
parsed (with-open [file (io/input-stream "resources\\tests\\cql\\ValueLiteralsAndSelectors.xml")]
               (cxs/parse schema file))]
  (pprint parsed))
When I try to jack in now, I'm getting the following error:
#error {
 :cause Attempting to call unbound fn: #'cider.nrepl.middleware.debug/debug-reader
 :via
 [{:type clojure.lang.Compiler$CompilerException
   :message Syntax error reading source at (cql_parser/core.clj:27:19).
   :data #:clojure.error{:phase :read-source, :line 27, :column 19, :source cql_parser/core.clj}
   :at [clojure.lang.Compiler load Compiler.java 7643]}
  {:type java.lang.IllegalStateException
   :message Attempting to call unbound fn: #'cider.nrepl.middleware.debug/debug-reader
   :at [clojure.lang.Var$Unbound throwArity Var.java 45]}]

fadrian16:09:27

Any ideas?

bringe17:09:19

Hmm that's odd because jack-in injects the cider nrepl middleware that holds the function it claims is unbound. I wonder if it's some kind of race condition.

bringe17:09:48

If you create an issue with repro steps then I can investigate