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

Preserve reader meta of fn #447

Closed
2 tasks done
borkdude opened this issue Nov 21, 2020 · 0 comments
Closed
2 tasks done

Preserve reader meta of fn #447

borkdude opened this issue Nov 21, 2020 · 0 comments

Comments

@borkdude
Copy link
Collaborator

borkdude commented Nov 21, 2020

(meta ^:foo (fn []))

should return {:foo true} but currently returns nil.

One problem here is that we should get rid of the edamame location metadata and only add metadata to the function if there was any non-location metadata.

TODO:

  • fix location in exception for (defn foo []) (foo 1)
  • a nasty side effect of putting the location metadata in a sub-key:
$ clojure -M:babashka/dev '(defmacro foo [m] (prn (meta m))) (foo (+ 1 2 3))'
#:sci.impl{:loc {:line 1, :column 40, :end-line 1, :end-column 49}}
borkdude added a commit that referenced this issue Nov 25, 2020
borkdude added a commit to babashka/babashka that referenced this issue Nov 25, 2020
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