calva

kiemdoder 2025-03-28T07:19:28.666249Z

I just found out Calva has a debugger which feels almost life changing 😃. I do not however see that a function that I instrument with alt+ctrl+c i is showing the horizontal bars to indicate that the function is instrumented. The debugger is working fine, its just the visual indication on the instrumented function that is not showing. Is there maybe something that I need to configure to get the visual indicators?

pez 2025-03-28T07:50:19.884489Z

It’s glitchy for unknown reasons. Sometimes I see it. Sometimes not. You are welcome to file an issue. Have you tried to evaluate debugged code while stepping in the debugger? It’s pretty powerful!

kiemdoder 2025-03-28T08:15:47.526419Z

Ooo, that is nice! I just tried out evaluating expressions in the context of a break point. Thank you so much for adding that.

🤘 1
pez 2025-03-28T08:27:48.067309Z

It’s good to know that this binding is really in “the context of the breakpoint” and not limited to the lexical scope. So you can have a Rich comment form below the function you are debugging and write and evaluate any code that uses the captured bindings.

kiemdoder 2025-03-28T08:41:36.048529Z

I noticed the call stack had only one entry. Is that expected?

kiemdoder 2025-03-28T08:46:59.665529Z

Never mind. I see there is a note about that in the documentation.

pez 2025-03-28T09:24:16.401349Z

Yes. I’ve spent some considerable time trying to fix that but I failed.

pez 2025-03-28T09:23:39.436299Z

I finally managed to get the VS Code team to see the issue with semantic tokens that risks breaking so many VS Code editing session if it reaches stable. They have this PM, Isodor Nikolic, who us really responsive. Aaaaand the attention had them update the issue with the info that it is now fixed. 🎉

🎉 4
Thierry 2025-04-01T17:57:24.523549Z

Missed your message there, will check tomorrow!

🙏 1
pez 2025-03-28T09:52:23.233999Z

It should be fixed in latest Insiders. Can you try your repro, @thierry572? It stopped reproducing for me for some reason. Maybe I happened to get an updated Insiders in while trying….

pez 2025-03-28T14:14:57.630989Z

Though report about that the issue is not fully fix just came in: https://github.com/microsoft/vscode/issues/243923#issuecomment-2761314682 I suspected as much as @thierry572 could repro just the other day. (Even with “fixed” Calva, so I think there is more to this than meets the eye.)

Thierry 2025-04-08T11:12:41.975329Z

check pm

pez 2025-04-07T10:03:24.844689Z

The VS Code team wants to know what’s in the dev console when this error happens. Can you provide, @thierry572? https://github.com/microsoft/vscode/issues/243923#issuecomment-2782753932

Thierry 2025-04-07T10:08:38.282979Z

Didnt I already copy paste this before?

pez 2025-04-07T10:11:17.935109Z

I don’t see any logs from you in that issue thread at least. 😃

Thierry 2025-04-07T10:11:42.873609Z

No I think I pm'd you

pez 2025-04-07T10:14:55.152679Z

Well, that was from a different build of Insiders, I think. They need logs from the latest build.

Thierry 2025-04-07T10:15:15.337269Z

ah, okay, will have to see if I can reproduce

Thierry 2025-04-07T10:15:24.519799Z

I will update all to latest version

pez 2025-04-07T10:16:43.018849Z

The version of Calva doesn’t matter here.

Thierry 2025-04-07T10:16:53.984679Z

Havent seen the issue yet today

pez 2025-04-07T10:17:30.783649Z

I don’t know wether to hope you run in to it or not. 😃

Thierry 2025-04-07T10:59:33.800419Z

well, I hope not, it's kind of breaking

Thierry 2025-04-03T07:29:08.868549Z

Havent forgotten you, going to install latest nightly and latest calva now

Thierry 2025-04-03T08:42:06.885599Z

No issues so far

🙏 1
Thierry 2025-04-03T10:16:12.397489Z

Aaaaannnd... it's gone

Thierry 2025-04-03T10:16:14.193189Z

damnit

pez 2025-04-03T10:22:10.841489Z

Thanks. I really wonder what the repro is…

Thierry 2025-04-03T10:22:21.080129Z

It took a while

Thierry 2025-04-03T10:22:38.833719Z

but I think it's a lot of

#'namespace/function
in the repl file

michaelwhitford 2025-03-28T20:52:05.001179Z

Is there a place in the calva config to inject more nrepl middleware? I would like to use flowstorm from calva and have it mostly working, except it needs more nrepl-middleware to get things like evals and *out* and *err* working.

pez 2025-03-28T21:01:33.664429Z

I don’t think we have this. But you can start the repl outside Calva and connect to it. You could use the command Calva: Copy Jack-in Command to Clipboard as a start. And you could also bake that into a custom connect sequence using the custom command line option: https://calva.io/connect-sequences/#custom-command-line

michaelwhitford 2025-03-28T21:16:03.195439Z

Actually I figured it out from the Calva docs! It's working with a custom deps.edn alias and custom connect sequence. In deps.edn:

{:aliases {:flowstorm {:classpath-overrides {org.clojure/clojure nil}
                 :extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.0-9"}
                              com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.2"}}
                 :jvm-opts [
                           ;; "-Xmx20500m"
                           ;; "-Dflowstorm.theme=dark"
                            "-Dflowstorm.startRecording=true"
                            "-Dclojure.storm.intrumentEnable=true"
                            "-Dclojure.storm.intrumentAutoPrefixes=true"
                            ]}}}
Custom connect sequence:
{
      "name": "flowstorm",
      "projectType": "deps.edn",
      "cljsType": "none",
      "extraNReplMiddleware": ["flow-storm.nrepl.middleware/wrap-flow-storm"],
      "afterCLJReplJackInCode": "((requiring-resolve 'flow-storm.storm-api/start-debugger))",
      "menuSelections": {
        "cljAliases": ["flowstorm"]
      }
}

pez 2025-03-28T21:18:20.135559Z

Yes, I even forgot about that obvious solution. 😃

pez 2025-03-28T21:30:42.518179Z

Wow, I had forgotten about extraNReplMiddleware. That’s what you asked about really. Though I have to say that there was something about the question that made me say “I don’t think we have this” 😃

michaelwhitford 2025-03-28T21:32:11.991259Z

Yeah it was a needle in a haystack trying to search google for it, I only realized it when I went back and read the entire doc page for custom connect sequences.

michaelwhitford 2025-03-28T21:33:56.410599Z

It's working perfectly with the custom connect sequence, very happy with the flexibility calva provides for customizing things.

🙏 1