Not respecting eval message :flie when evaluating a form
jpmonettas opened this issue · 0 comments
jpmonettas commented
Currently if you evaluate any ClojureScript form via piggieback the :file
field in the message will be ignored, and "cljs-repl" will be used as a file. When defining a var, this will affect the var metadata :file
field which is used for example for finding sources via clojure.repl/source
.
I think when :file
is present (when using cider to eval for example) it should be used instead of "cljs-repl".
One way of testing this with Cider is :
- do a
cider-jack-in-cljs
with a browser repl (no shadow-cljs, since shadow middleware works fine in this respect). - require a cljs namespace
- check the file meta of any function (-> #'my-ns/some-fn meta :file), it should be correct
- re-evaluate the function from the editor
- check the meta again, it should be "cljs-repl" now, even when we re-evaluated from a saved file buffer