Skip to content

neorepl 0.6.0

Latest

Choose a tag to compare

@bbatsov bbatsov released this 28 Nov 11:06
· 5 commits to main since this release

Errors made easy (to fix).

Features

  • #89: neorepl installs as a Clojure CLI tool, from git, with clojure -Ttools install-latest :lib io.github.nrepl/neorepl :as neorepl, and each command is a function of the tool, as in clojure -Tneorepl repl.
  • #90: neorepl apropos --tooling and the REPL's tooling setting keep the namespaces of nREPL, cider-nrepl and its libraries in apropos, and, for the setting, in the namespace browser's list of every namespace.
  • #93: The REPL follows an error with what to try: for code naming something that isn't there, the name marked in the input and the requires, imports and corrected names that could fix it, numbered for ,fix N, and for the first few other errors, ,pst and ,stacktrace, which the hints setting turns off.
  • #94: ,break has a function stop at each step, through cider-nrepl's debugger, as #dbg in the input does, with CIDER's keys at each breakpoint, ,breaks to list what stops and ,unbreak to take it out.
  • #95: Other errors in the REPL get what they say past their message: an ex-info's data as fields, the arglists of a function called with the wrong number of arguments, what the commonest errors tend to mean, and the line of the project's code they came from.
  • #96: neorepl eval and the MCP eval tool follow an error about a name that isn't there with the fixes to try, which --format edn and json and the tool's structured content have as suggestions, each with the code to evaluate for it.
  • #97: ,debug runs the input that failed last again, stopping where it throws, with the locals, and what the REPL instrumented runs as it is again once it exits, rather than leaving breakpoints no one answers.
  • #98: A breakpoint on a thread of its own, like an HTTP handler's, waits with a note above the prompt, rather than going on, until ,stop goes to it.
  • #99: ,break-at FILE LINE has what starts at a line of a file stop at each step, in a method or a def too, and ,unbreak-at takes the line out.

Changes

  • #84: Locations in text, as where, refs, deps and check print them, are relative to the directory neorepl runs in, when they're in it.
  • #85: The profile summary fits in a terminal, without the columns only CIDER's inspector needs.
  • #85: neorepl profile --format edn and json give the summary as a list of maps, one for each function, rather than the text table.
  • #87: Jack-in brings cider-nrepl 0.64.1, whose reloads point the aliases and refers on the namespaces they make anew at the new ones, and keep the session in its namespace, which neorepl now does itself only for an older cider-nrepl.
  • #90: ,ns takes the namespaces whose sources are under the directory the server runs in for the project's, as CIDER does, where it took any whose source wasn't in a jar, git and :local/root dependencies' too.
  • #90: ,apropos, neorepl apropos and the namespace browser's list of every namespace leave out the REPL tooling's: nREPL's, cider-nrepl's and those of the libraries cider-nrepl uses, like compliment and orchard, unless their sources are the project's, as they are when one of them is the project.
  • #91: ,apropos and C-x C-a fit what they list to the terminal: a name longer than a third of its width gets its doc on the next line, and the docs are cut to fit.

Bug fixes

  • #87: ,reload leaves *1 as it was, rather than setting it to the REPL's namespace.
  • #94: Ctrl-C stops code that won't stop on JDK 20 and later in the servers neorepl server starts for the Clojure CLI and Leiningen, which get -Djdk.attach.allowAttachSelf for nREPL's agent.
  • #100: Each form of code evaluated together, as eval -f and pasted input are, gets the line and column it starts at, so the errors, stack frames and definitions of the forms after the first point at them rather than somewhere above.