cursive

Issues at: https://git.io/cursive-issues
2021-02-26T22:16:39.082300Z

this isn’t Cursive specific, I don’t believe, but I figure people here might know… is it just me, or are all the in-scope vars null when walking up the stack in the IntelliJ debugger? they’re only populated in the bottom-most frame (i.e. directly on the breakpoint). I presume this is a side effect of how the Clojure runtime works, but just in case there’s any sort of optimization level that can be tweaked, that would make debugging a lot more pleasant.

2021-02-28T02:35:33.092Z

actually, had a chance to try it out tonight, and yeah. this is going to be a game changer. have a nice rest of the weekend!

dpsutton 2021-02-26T22:33:10.082400Z

check out this article about locals clearing

2021-02-26T22:39:18.082900Z

whoa, nice. that was easy! guess I just need to run this in the remote REPL just after attaching:

(alter-var-root #'clojure.core/*compiler-options* 
                update :disable-locals-clearing not)

2021-02-26T22:40:27.083100Z

er, actually, that’s too late… hmm

2021-02-26T22:46:18.083300Z

I basically need to find some way to run that before everything else gets loaded, I think

dpsutton 2021-02-26T23:02:40.083900Z

I thought you just restart the repl with that option set

2021-02-26T23:03:05.084100Z

well, I’m using a remote REPL in this case

dpsutton 2021-02-26T23:03:35.084700Z

Oh I see. Running it in docker or something?

2021-02-26T23:03:55.084900Z

uh… running lein repl in Metabase 😆

dpsutton 2021-02-26T23:04:36.085700Z

Ah. Then just let cursive start it up. Not a remote connection then

2021-02-26T23:05:01.085900Z

that works some of the time, but not all (ex: driver loading)

dpsutton 2021-02-26T23:07:43.086600Z

Then I’m out of cursive knowledge at that point :)

2021-02-26T23:08:36.086800Z

yeah I think basically if you let Cursive launch it, then it must do this alter-var-root invocation for you

2021-02-26T23:09:38.087Z

I suspect there is some way to do it that Clojure just reads, i.e. https://clojure.atlassian.net/browse/CLJ-860

alexmiller 2021-02-26T23:19:23.087500Z

-Dclojure.compiler.disable-locals-clearing=true