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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader conditional :cljd not working for defmacro #59

Open
pfeodrippe opened this issue May 5, 2022 · 2 comments
Open

Reader conditional :cljd not working for defmacro #59

pfeodrippe opened this issue May 5, 2022 · 2 comments

Comments

@pfeodrippe
Copy link
Contributor

pfeodrippe commented May 5, 2022

I'm calling (->Node 10 20) and I'm having an error when using the reader conditional :cljd to define the ->Node macro.

Oh noes! 馃樀
Error while compiling (->Node 10 20)

See definitions below

;; It works.
(defmacro ->Node
  [body stack])

;; It does not work (the error appears only when calling `->Node`).
#?(:cljd (defmacro ->Node
           [body stack]))

;; It works.
#?(:clj (defmacro ->Node
          [body stack]))
@cgrand
Copy link
Contributor

cgrand commented May 5, 2022

Macros are in a weird state at the moment (they are run by Clojure JVM), we didn't want to follow CLJS route since self-hosting is the goal.
In the mean time it may cause problems for cljc with macros. Could you give more context so that we figure a workaround out?

@pfeodrippe
Copy link
Contributor Author

Macros are in a weird state at the moment (they are run by Clojure JVM), we didn't want to follow CLJS route since self-hosting is the goal. In the mean time it may cause problems for cljc with macros. Could you give more context so that we figure a workaround out?

Oh okay, thanks. I can do without it for now, I am just trying to compile some usable subset of SCI.

For context, I'm having issues with https://github.com/pfeodrippe/sci-test/blob/525d83755cc71d50dac0a8941b67c00a9910ae66/src/sci/impl/types.cljc#L86.

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

2 participants