Repository navigation
Say what went wrong, in the format asked for - #30
Merged
Merged
Conversation
Anything starting with a dash was an option, so doc ->, where -main and complete -ma failed with an unknown option. An argument is now an option only when it looks like one: --name, a short -x, or a known short option with more after it, which stays the unknown option it was.
Most failures, like no server to talk to, a usage mistake or the server failing an op, only warned on stderr, so --format edn and json left stdout empty for scripts to choke on. They now come out in the format asked for, as their status and message. run parses the arguments once for the command and the failure both.
A server that restarts loses its sessions, and neorepl quietly gave the next call a fresh one, in user, without the *1 or definitions the session had, while pst and interrupt said there was no session by that name. sessions/ensure! now calls back when it replaces one, which the CLI warns about on stderr and the MCP tools put in their result, and the commands that don't make one, pst, interrupt and sessions close among them, say the session is gone. MCP's pst no longer makes a fresh one either.
An evaluation left running in a session, by a client that went away, say, keeps the next one waiting, and a timeout then said interrupting the evaluation failed, since the server answers that another one is running. It now says the evaluation waits behind one from before, which interrupting the session stops.
The server's reader places a missing paren as a line of the REPL, so loading a file that doesn't balance said REPL:9:1, and a file that can't be read got a raw exception. eval -f, load and the MCP load tool now check the file the way neorepl check does, saying where it doesn't balance and that check --fix repairs it, and that a file can't be read. macroexpand says a form doesn't balance, rather than asking for one form.
The server's exception came through as "The server couldn't do eval" or lookup and the whole of it. A namespace that isn't there now says so, from nREPL's namespace-not-found, from the fallbacks that evaluate code, and from nREPL's lookup, which only says lookup-error and gets the fallback then. apropos checks the regex before it goes out. cider-nrepl answers inspected code that throws with the whole stack trace, which comes down to its first line and its root cause, as eval would say it.
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.
Failures used to come out as the server's raw exception, or as nothing at all on stdout for
--format json. Now each says what's wrong: a namespace that isn't there, a regex that doesn't parse, a file that doesn't balance or can't be read, a session the server lost, a timeout stuck behind an evaluation left in the session.doc ->andwhere -mainalso work now, because an argument only counts as an option when it looks like one.