Skip to content

Add cider-tap for viewing values sent to tap>#4044

Open
bbatsov wants to merge 1 commit into
masterfrom
cider-tap-client
Open

Add cider-tap for viewing values sent to tap>#4044
bbatsov wants to merge 1 commit into
masterfrom
cider-tap-client

Conversation

@bbatsov

@bbatsov bbatsov commented Jun 27, 2026

Copy link
Copy Markdown
Member

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-tap opens a *cider-tap* buffer that streams every value sent to tap> - each as a timestamped one-line summary with a type/size hint - and RET on 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-subscribe request stays open and each tapped value arrives as a streamed message; killing the buffer unsubscribes. RET sends cider/tap-inspect with the entry's index, and the response is rendered with the existing cider-inspector--render-value.

Keys: RET inspect, n/p move, c clear, q quit.

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 tap middleware; 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.

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.
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