Supported nREPL operations
September 16, 2015 ยท View on GitHub
generated from a verbose 'describe' response (nREPL v0.2.11-SNAPSHOT)
Operations
:clone
Clones the current session, returning the ID of the newly-created session.
Required parameters
Optional parameters
:sessionThe ID of the session to be cloned; if not provided, a new session with default bindings is created, and mapped to the returned session ID.
Returns
:new-sessionThe ID of the new session.
:close
Closes the specified session.
Required parameters
:sessionThe ID of the session to be closed.
Optional parameters
Returns
:describe
Produce a machine- and human-readable directory and documentation for the operations supported by an nREPL endpoint.
Required parameters
Optional parameters
:verbose?Include informational detail for each "op"eration in the return message.
Returns
:auxMap of auxilliary data contributed by all of the active nREPL middleware via :describe-fn functions in their descriptors.:opsMap of "op"erations supported by this nREPL endpoint:versionsMap containing version maps (like *clojure-version*, e.g. major, minor, incremental, and qualifier keys) for values, component names as keys. Common keys include "nrepl" and "clojure".
:eval
Evaluates code.
Required parameters
:codeThe code to be evaluated.:sessionThe ID of the session within which to evaluate the code.
Optional parameters
:columnThe column number in [file] at which [code] starts.:evalA fully-qualified symbol naming a var whose function value will be used to evaluate [code], instead ofclojure.core/eval(the default).:fileThe path to the file containing [code].clojure.core/\*file\*will be bound to this.:idAn opaque message ID that will be included in responses related to the evaluation, and which may be used to restrict the scope of a later "interrupt" operation.:lineThe line number in [file] at which [code] starts.
Returns
:exThe type of exception thrown, if any. If present, thenvalueswill be absent.:ns*ns*, after successful evaluation ofcode.:root-exThe type of the root exception thrown, if any. If present, thenvalueswill be absent.:valuesThe result of evaluatingcode, oftenreadable. This printing is provided by thepr-valuesmiddleware, and could theoretically be customized. Superseded byexandroot-exif an exception occurs during evaluation.
:interrupt
Attempts to interrupt some code evaluation.
Required parameters
:sessionThe ID of the session used to start the evaluation to be interrupted.
Optional parameters
:interrupt-idThe opaque message ID sent with the original "eval" request.
Returns
:status'interrupted' if an evaluation was identified and interruption will be attempted 'session-idle' if the session is not currently evaluating any code 'interrupt-id-mismatch' if the session is currently evaluating code sent using a different ID than specified by the "interrupt-id" value
:load-file
Loads a body of code, using supplied path and filename info to set source file and line number metadata. Delegates to underlying "eval" middleware/handler.
Required parameters
:fileFull contents of a file of code.
Optional parameters
:file-nameName of source file, e.g. io.clj:file-pathSource-path-relative path of the source file, e.g. clojure/java/io.clj
Returns
:exThe type of exception thrown, if any. If present, thenvalueswill be absent.:ns*ns*, after successful evaluation ofcode.:root-exThe type of the root exception thrown, if any. If present, thenvalueswill be absent.:valuesThe result of evaluatingcode, oftenreadable. This printing is provided by thepr-valuesmiddleware, and could theoretically be customized. Superseded byexandroot-exif an exception occurs during evaluation.
:ls-sessions
Lists the IDs of all active sessions.
Required parameters
Optional parameters
Returns
:sessionsA list of all available session IDs.
:stdin
Add content from the value of "stdin" to *in* in the current session.
Required parameters
:stdinContent to add to *in*.
Optional parameters
Returns
:statusA status of "need-input" will be sent if a session's *in* requires content in order to satisfy an attempted read operation.