Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

a.b$macros is different than aa.b$macros in REPL #301

Open
tiye opened this issue Oct 27, 2017 · 5 comments
Open

a.b$macros is different than aa.b$macros in REPL #301

tiye opened this issue Oct 27, 2017 · 5 comments
Labels

Comments

@tiye
Copy link
Contributor

tiye commented Oct 27, 2017

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...

@mfikes
Copy link
Collaborator

mfikes commented Oct 27, 2017

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)

@tiye
Copy link
Contributor Author

tiye commented Oct 27, 2017

@mfikes I think we should trya.b, which is so short than anything.

@tiye
Copy link
Contributor Author

tiye commented Oct 27, 2017

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

@anmonteiro
Copy link
Owner

This is still an upstream issue. Apparently https://dev.clojure.org/jira/browse/CLJS-2024 wasn't enough to fix it.

@anmonteiro
Copy link
Owner

Submitted a fix in https://dev.clojure.org/jira/browse/CLJS-2419, will close this when a released version of ClojureScript includes the patch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants