Closed dionysus98 closed 1 year ago
Hi! Thanks for reporting. Which version of ClojureScript are you using? And how are you starting it? Does the connect fail?
Hello! I'm using shadow-cljs v2.21.0 and clojurescript version v1.11.60
And I Jack-in using replConnectSequences
{
"calva.replConnectSequences": [
{
"name": "km-admin",
"projectType": "shadow-cljs",
"cljsType": "shadow-cljs",
"jackInEnv": {
"DEBUG": true,
"WA_SERVER": "undefined",
"SVC_SERVER": "undefined",
}
}
]
}
And no, the connect doesn't seem to fail. But it doesn't seem to evaluate any external namespaces. For example, reagent.dom
filepath cannot be found when I try to require it. Though building and the rest works fine as it is.
calva v2.0.355 doesn't seem to have any issues.
Thanks,
Also the clj projects works fine, just cljs is having this issue.
Thanks! I'll try to reproduce this with your connect sequence.
Oh, one more thing. There's another change between 355 and 356 that might be what causes the problem with finding the filepath of external libraries. With 356 Calva should wait for you to start the ClojureScript app before the connect sequence connects the ClojureScript REPL. Does this seem to happen for you? Are you working on a browser app?
Yes, I did read that in the docs and I'm working on a browser-app. I think it does happen that way, Calva prints the info "start your clojurescript app"
Hope this is helpful. And thank you for looking into it,
Does Calva wait for you to start your app or does it continue without this being done?
I see on the screenshot that the prompt is still a clj
prompt when it should be a cljs
one, so it it indicates that the ClojureScript REPL never is connected.
I can't reproduce this yet, @dionysus98, so will be spamming you with questions. 😄 One more thing you can test for me is to set calva.autoEvaluateCode.onConnect.cljs
to null
, and see if that makes the connection work. It could give us a clue to which new feature the error stems from.
Sure, do spam me with questions. And as for clj
session, if you look at line 21 it does try to start a cljs
connection and stops there until it throws me an clojure.lang.compiler$CompilerException
at line 28. And I've set it to null and an empty string before creating this issue but it's the same errors and even calva connection logs
doesn't provide me much. I'll try again. Also a coworker of mine seem to be facing the same issue for cljs
on a windows system.
I can reproduce this in a project of mine now. Let's see if I also can fix it! 😄
Okay great, thank you for doing this.
Found the bug. I had hardcoded the build we were waiting for. Fixed it in dev. Will release it once I see that it passes CI tests.
Thanks. That's great, I'll wait for the release.
It's out now according to Microsoft. It can take a while before VS Code agrees, please have a check and take v2.0.358 for a spin. I'll be monitoring here for any reports on how you fare, @dionysus98.
Okay, I'll check it out and let you know if there's still an issue.
Checked just now. Repl connects fine for both clj
and cljs
.
Thanks for the fix. c:
@PEZ
Thanks for reporting and being quick to reply here. Would have taken me ages to figure it out without your help!
Really glad I was able to help.
In the default setting of "calva.autoEvaluateCode.onConnect.cljs" the cljs.repl requires a macro called "print-doc" which is undefined.
(try (require '[cljs.repl :refer [apropos dir doc find-doc print-doc pst source]]) (catch :default e (js/console.warn "Failed to require cljs.repl utilities:" (.-message e))))