Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not respecting eval message :flie when evaluating a form #126

Open
jpmonettas opened this issue Jul 17, 2023 · 0 comments
Open

Not respecting eval message :flie when evaluating a form #126

jpmonettas opened this issue Jul 17, 2023 · 0 comments

Comments

@jpmonettas
Copy link

jpmonettas commented Jul 17, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant