lumo
lumo copied to clipboard
a.b$macros is different than aa.b$macros in REPL
I found my experiment failed:
a.b$macros=> (ns a.core$macros)
nil
a.core$macros=> (defmacro hell [x] `(+ x 2))
#'a.core$macros/hell
a.core$macros=> (macroexpand '(a.core/hell 1))
(a.core/hell 1)
Then tried with a.core, aaaa.b, aa.b, and most of them works
a.core$macros=> (ns foo.core$macros)
nil
foo.core$macros=> (defmacro hell [x] `(+ x 2))
#'foo.core$macros/hell
foo.core$macros=> (macroexpand '(foo.core/hell 1))
(js* "(~{} + ~{})" foo.core/x 2)
Can't figure out why...
Not reproducible in Planck:
$ planck
Planck 2.8.1
ClojureScript 1.9.947
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Exit: Control+D or :cljs/quit or exit or quit
Results: Stored in vars *1, *2, *3, an exception in *e
cljs.user=> (ns a.core$macros)
nil
a.core$macros=> (defmacro hell [x] `(+ x 2))
#'a.core$macros/hell
a.core$macros=> (macroexpand '(a.core/hell 1))
(js* "(~{} + ~{})" a.core/x 2)
@mfikes I think we should trya.b, which is so short than anything.
Nooooo.....
cljs.user=> (ns a.core$macros)
nil
a.core$macros=> (defmacro hell [x] `(+ x 2))
undefined is not an object (evaluating 'a.core$macros')
a.core$macros=>
=>> planck --version
2.8.1
This is still an upstream issue. Apparently https://dev.clojure.org/jira/browse/CLJS-2024 wasn't enough to fix it.
Submitted a fix in https://dev.clojure.org/jira/browse/CLJS-2419, will close this when a released version of ClojureScript includes the patch.