We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
version
0.4.33
platform
JVM, linux binary
problem
In macros that expand to a def call, the resulting var is missing the :line metadata
repro
(defmacro foodef [sym & body] `(def ~sym ~@body)) (foodef x 1) (prn (meta #'x))
Babashka v0.9.163-SNAPSHOT REPL. Use :repl/quit or :repl/exit to quit the REPL. Clojure rocks, Bash reaches. user=> (defmacro foodef [sym & body] `(def ~sym ~@body)) #'user/foodef user=> (foodef x 1) #'user/x user=> (meta #'x) {:name x, :ns #object[sci.lang.Namespace 0x11e36c1c "user"], :file "<repl>"}
expected behavior
in clojure:
Clojure 1.11.1 user=> (defmacro foodef [sym & body] `(def ~sym ~@body)) #'user/foodef user=> (foodef x 1) #'user/x user=> (meta #'x) {:line 1, :column 1, :file "NO_SOURCE_PATH", :name x, :ns #object[clojure.lang.Namespace 0xf9b5552 "user"]}
Comes from this babashka ticket: babashka/babashka#1367
The text was updated successfully, but these errors were encountered:
meta data is also missing from def without macro
def
Babashka v0.9.163-SNAPSHOT REPL. Use :repl/quit or :repl/exit to quit the REPL. Clojure rocks, Bash reaches. user=> (def a 1) #'user/a user=> (meta #'a) {:name a, :ns #object[sci.lang.Namespace 0x452d6fd "user"], :file "<repl>"} user=>
vs clojure
Clojure 1.11.1 user=> (def a 1) #'user/a user=> (meta #'a) {:line 1, :column 1, :file "NO_SOURCE_PATH", :name a, :ns #object[clojure.lang.Namespace 0x22175d4f "user"]} user=>
Sorry, something went wrong.
2b8751f
No branches or pull requests
version
0.4.33
platform
JVM, linux binary
problem
In macros that expand to a def call, the resulting var is missing the :line metadata
repro
expected behavior
in clojure:
Comes from this babashka ticket: babashka/babashka#1367
The text was updated successfully, but these errors were encountered: