Skip to content

Check servers with the requests CIDER actually sends - #4

Merged
bbatsov merged 2 commits into
mainfrom
client-profiles
Oct 8, 2026
Merged

bbatsov merged 2 commits into
mainfrom
client-profiles

Conversation

@bbatsov

@bbatsov bbatsov commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Adds client profiles: each check sends what a client sends in some situation and fails at the first reply the client couldn't use, citing the client code. CIDER's profile covers connecting, evaluating from a source buffer and REPL evals with all their real fields, and every server in the matrix passes it today.

Also fixes eval.error-report, which claimed CIDER reads ex to spot failed requests.

eval.error-report said CIDER's synchronous requests look at ex and err
to decide whether a request failed, citing CIDER's eval-error status
handling. The synchronous path does bind ex and err, but only acts when
the reply also has a key named eval-error, which servers don't send
(they put eval-error in status). What CIDER does with err is show it as
error output, so that's what the check cites now.

The link to the cond that reads value, out and err stopped a line short
of the err branch, so it covers that too now.
The checks ask each question in the simplest way possible, so they say
little about what real clients send. CIDER puts the file, line and
column of the code in its eval requests, along with print options (one
a nested dict, another an empty list), and a server that can't handle
any of those breaks CIDER while passing every other check.

A client profile says what one client sends in a few situations and
what the client needs from each reply, with links to the code that
needs it. Each situation becomes a check that sends those requests and
fails at the first reply the client couldn't use, e.g. a clone without
a new-session ("CIDER gives up connecting"), a versions.clojure that
isn't a dict (the REPL banner looks it up) or an eval without the
value. Replies the client only shows to the user, like the error a
non-Clojure server gives for CIDER's startup code, get a note.

The profiles are TOML files built into proof, starting with CIDER's:
connecting, evaluating code from a source buffer (with the buffer's ns
form first) and evaluating code in the REPL, as CIDER does them with
its default settings. The user's code is the profile's value snippet.
Only the ns form needs Clojure, so cider.eval needs the new clojure
capability, which the profiles of the Clojure servers declare. Every
server in the matrix passes the checks that apply to it, and so does
proof serve under every scenario.
@bbatsov
bbatsov merged commit f90522f into main Oct 8, 2026
4 checks passed
@bbatsov
bbatsov deleted the client-profiles branch October 8, 2026 06:35
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