nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
2021-06-01T17:45:44.019500Z

Following nREPL requests during my CIDER sessions, I see that cider-eval-buffer sometimes results in :op "load-file", but sometimes (on some sessions) it actually results in :op "eval" , where the request looks like the following (omitting the :session member for brevity):

{:transport
 #object[nrepl.middleware.load_file$wrap_load_file$fn$reify__1455 0x7732719a "nrepl.middleware.load_file$wrap_load_file$fn$reify__1455@7732719a"],
 :nrepl.middleware.print/print-fn
 #function[nrepl.middleware.print/wrap-print/fn--891/print--893],
 :op "eval",
 :nrepl.middleware.caught/caught-fn
 #function[clojure.main/repl-caught],
 :id "991",
 :session ...,
 :code
 "(try (clojure.lang.Compiler/load (java.io.StringReader. ((clojure.core/deref (clojure.core/deref (var nrepl.middleware.load-file/file-contents))) (quote [\"/path/to/my/clojure/file.clj\" G__23397]))) \"/path/to/my/clojure/file.clj\" \"file.clj\") (finally (clojure.core/swap! (clojure.core/deref (var nrepl.middleware.load-file/file-contents)) clojure.core/dissoc (quote [\"/path/to/my/clojure/file.clj\" G__23397]))))"}
I coulndn't put the finger on what may have happened in my setup that made this happen. Any idea why this happens? (It is not necessarily a problem. I'm just wondering if this is typical, and if I should expect more kinds of behaviors when evaluating buffers.) 🙏