ritz.nrepl.middleware.tracking-eval documentation

An eval operation with source form tracking.


[bindings {:keys [code ns transport file-path id line], :as msg}]

Evaluates some code within the dynamic context defined by a map of bindings, as per clojure.core/get-thread-bindings.

Uses clojure.main/repl to drive the evaluation of :code in a second map argument (a string), which may also optionally specify a :ns (resolved via find-ns). The map MUST contain a Transport implementation in :transport; expression results and errors will be sent via that Transport.

Returns the dynamic scope that remains after evaluating all expressions in :code.

It is assumed that bindings already contains useful/appropriate entries for all vars indicated by clojure.main/with-bindings.


[h & {:keys [executor], :or {executor (configure-executor)}}]

Evaluation middleware that supports interrupts and tracking of source forms. Returns a handler that supports "eval" and "interrupt" :op-erations that delegates to the given handler otherwise.



Middleware that notes and allows query of source forms.