calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
il-tmfv 2020-09-28T07:49:44.053400Z

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.

2020-09-28T07:52:48.054Z

iiuc what is happening is roughly the following...

2020-09-28T07:53:30.054900Z

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

2020-09-28T07:53:46.055500Z

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

2020-09-28T07:53:48.055700Z

does it make sense?

borkdude 2020-09-28T07:54:12.055900Z

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

il-tmfv 2020-09-28T07:56:37.058Z

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

2020-09-28T07:56:49.058300Z

here is a relatively recent article that goes into it: https://www.bounga.org/tips/2020/04/07/instructs-mac-os-gui-apps-about-path-environment-variable/

2020-09-28T07:57:25.058800Z

i have not tried any of that fwiw

borkdude 2020-09-28T08:01:12.060100Z

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

borkdude 2020-09-28T08:02:15.060600Z

or something similar

borkdude 2020-09-28T08:02:23.060900Z

you can also make an Alfred specialized command for this

il-tmfv 2020-09-28T08:02:29.061100Z

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-tmfv 2020-09-28T08:03:48.062300Z

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

2020-09-28T08:07:58.063Z

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.

2020-09-28T08:08:34.063400Z

so vscode analyzes one's .zshrc?

il-tmfv 2020-09-28T08:09:37.064400Z

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

2020-09-28T08:09:58.064800Z

it's hard to tell...perhaps so

pez 2020-09-28T10:35:32.066900Z

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

2020-09-28T16:52:17.069700Z

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

2020-09-28T16:52:27.069900Z

Any ideas?

bringe 2020-09-28T17:21:19.071100Z

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.

bringe 2020-09-28T17:21:48.071700Z

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

bringe 2020-09-28T17:21:59.071900Z

@fadrian