Repository navigation
Check servers with the requests CIDER actually sends - #4
Merged
Merged
Conversation
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.
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.
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.