Skip to content

Fix pst's frames, reload after a deleted file, and risky traces - #31

Merged
bbatsov merged 3 commits into
mainfrom
frames-polish
Oct 20, 2026
Merged

bbatsov merged 3 commits into
mainfrom
frames-polish

Conversation

@bbatsov

@bbatsov bbatsov commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

pst showed the REPL's own frames when the server had no cider-nrepl. With cider-nrepl and bb it hid the outer of two functions defined at the REPL, because cider-nrepl's duplicate flag goes by file and line. neorepl now does its own flagging on every server. The other commits get reload working again after a namespace's file is deleted, using refresh-clear only in that case, and stop ,trace from tracing what the tooling itself calls, which took the server down.

Without cider-nrepl, the frames of what runs the code went by a pattern
that wanted clojure.main/, while the REPL's are clojure.main$repl and
the like, so twelve of fourteen frames were the REPL's own. They now go
by the classes orchard goes by, the REPL's eval and apply among them, for
every server's frames, which takes care of bb's cider-nrepl ones too.

cider-nrepl takes a frame for a duplicate of the one before by its file and
line, which a REPL's functions all share, so pst never showed the outer
of two functions defined at the REPL. Its dup flag goes, and neorepl's own
goes by the class, which tells a function's anonymous fns apart, or by the
var, for bb's frames, named after their vars.
cider-nrepl's refresh keeps a namespace whose file was deleted on its list,
so every refresh after failed to find it, until the server restarted.
When the namespace it can't find is the one it was reloading, reload now
has cider-nrepl forget them all, with refresh-clear, and tries again. Not
for a namespace one of them requires, which forgetting would only reload
the whole project for. ask keeps the responses in its error for that.
Tracing clojure.core/map, or anything else cider-nrepl, orchard and nREPL
call, traced the tracing too, and took the server down. trace now looks
the name up first and won't, saying why. Macros go on to the server as
before, which won't trace them, and untracing is always fine.
@bbatsov
bbatsov merged commit 047a0f4 into main Oct 20, 2026
18 checks passed
@bbatsov
bbatsov deleted the frames-polish branch October 20, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant