Add cider-tap for viewing values sent to tap>#4044
Open
bbatsov wants to merge 1 commit into
Open
Conversation
A `*cider-tap*' buffer that streams the values sent to `tap>' and lets you inspect any of them with RET, reusing the existing inspector - so there's no need to leave Emacs for an external tap viewer. Mirrors the trace streaming buffer: a `cider/tap-subscribe' request stays open and each tapped value arrives as a streamed message, rendered as a timestamped one-line summary tagged with its index; killing the buffer unsubscribes. RET sends `cider/tap-inspect' for the value's index, which opens it in the inspector. Requires the companion `tap' middleware in cider-nrepl; the centralized op check gives a clear message when it's missing. This is the client half of the native tap viewer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Client half of a native
tap>viewer (server side: clojure-emacs/cider-nrepl#1006).tap>is the de-facto Clojure inspection workflow (Portal, REBL, shadow Inspect), and CIDER could already send to taps but had nowhere to receive them.M-x cider-tapopens a*cider-tap*buffer that streams every value sent totap>- each as a timestamped one-line summary with a type/size hint - andRETon an entry opens it in the regular inspector (so all the inspector navigation works for free).Implementation mirrors the trace streaming buffer almost exactly: a
cider/tap-subscriberequest stays open and each tapped value arrives as a streamed message; killing the buffer unsubscribes.RETsendscider/tap-inspectwith the entry's index, and the response is rendered with the existingcider-inspector--render-value.Keys:
RETinspect,n/pmove,cclear,qquit.This is a prototype / first cut - first-cut decisions (per discussion, to revisit): retention cap 100, on-demand open (no auto-popup), one buffer per connection, complement (not replace) Portal. Needs the cider-nrepl
tapmiddleware; until then the op check reports it's unavailable. Clojure-only for now; a cljs path can follow. No keybinding/menu entry yet (kept the prototype focused).Compiles clean under
--warnings-as-errors.