This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-24
Channels
- # announcements (3)
- # aws (5)
- # babashka (10)
- # beginners (61)
- # calva (22)
- # clara (9)
- # clj-kondo (8)
- # cljdoc (8)
- # cljsrn (15)
- # clojure (44)
- # clojure-australia (2)
- # clojure-europe (31)
- # clojure-hungary (20)
- # clojure-nl (5)
- # clojure-uk (3)
- # core-logic (2)
- # cursive (2)
- # data-science (2)
- # datalevin (4)
- # datascript (6)
- # datomic (17)
- # defnpodcast (1)
- # figwheel-main (1)
- # fulcro (18)
- # graalvm (2)
- # introduce-yourself (2)
- # jobs (1)
- # jobs-discuss (59)
- # lsp (44)
- # music (1)
- # nrepl (2)
- # off-topic (26)
- # pedestal (2)
- # re-frame (12)
- # reagent (27)
- # releases (1)
- # remote-jobs (4)
- # rewrite-clj (2)
- # sci (12)
- # shadow-cljs (12)
- # sql (10)
- # uncomplicate (6)
- # vim (12)
- # xtdb (2)
My repl gets stuck at why I try to jack-in:
; This is the Calva evaluation results output window.
; TIPS: The keyboard shortcut `ctrl+alt+c o` shows and focuses this window
; when connected to a REPL session.
; Please see for more info.
; Happy coding! ♥️
Then if I restart/reload vscode without modifying any files and head straight to jacking-in, it starts up. Any ideas on this?sounds like a weird race-condition. does clojure-lsp start up correctly?
@U02EMBDU2JU Yes it is starting correctly.
@U5BRU7X8Q let me see if I fully understand your reproduction: You start vscode, call the jack-in command -> the repl never finishes starting and the calva-repl window hangs with your message. When you reload (restart extension host command?) and jack-in everything works?
@U02EMBDU2JU Yes, when I execute Reload Window
and jack-in, it starts correctly, but onyl if I don't edit any clj
files before doing so.
@U5BRU7X8Q thats a strange one 😅 in the broken case, does a terminal open that tries to start the nrepl? and please try the “Calva: Copy Jack-In Command to Clipboard”, copy that into a terminal and then do “Calva: connect to a running repl”. If that works, we narrow it down by a lot
I noticed a strange behaviour in the Test Explorer and Clojure LSP interplay: Since I typed in this name of this test, it looks like LSP returned a bunch of partial matches, and emitted Test Tree items for the partially typed names of the test.
We don’t have a way of knowing when tests are removed from a namespace, so the test tree has a risk that it will grow and become stale.
whats the name of the LSP rpc call you are making here? I’ve spend too much time debugging the calva<->lsp connection lately, might as well use the new knowledge to help out here 🙂
clojure-lsp emits a new TestTree event since the most recent version
@U02EMBDU2JU I don’t think there is a bug per se, I think the way the Test Explorer feature works is flawed.
Yeah, @U0K592YDP clojure-lsp should send a event if that file as changed and you should take that as the new truth. But we probably are not sending that when a file is deleted, maybe we should or client can handle that already by itself?
My other Test Explorer find of the day. I’m connected to a project that has a running REPL, but the cider-nrepl
middleware is not loaded by this project. (I connected to an existing REPL, I didn’t Jack In). When you try to run a test, we handle the case pretty gracefully:
clj꞉workflows-conductor.workflow.config-test꞉>
; Evaluating file: config_test.clj
#'workflows-conductor.workflow.config-test/stand-alone-project-filters
; Running test: stand-alone-project-filters…
; The server does not recognize or cannot perform the 'test-var-query' operation
The error message `The server does not recognize or cannot perform the 'test-var-query' operation
Describes exactly what the problem was, but it doesn’t explain it in a way that is very helpful to the user, nor does it teach them how to fix the problem.
Does anyone have any ideas on how we can surface this in a better way to the user?Maybe mentioning that cider-nrepl is either missing as a repl dendency or a late enough version is not being used would be helpful as a start. Maybe it could also mention using jack-in, or using the command to copy the jack-in command in order to start the repl manually with the right dependencies (or use it as a reference to do so).
As a beginner, something telling me to “try jack-in” would be more hepful than “this dependency you probably aren’t familiar with and might not know how to add is missing,” so just mentioning the cider-nrepl part is probably not very helpful, at least in that case.
I think this is a symptom of this issue: https://github.com/BetterThanTomorrow/calva/issues/1495