You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Macros are complicated by the fact that ClojureScript, for historic reasons, does not normally support macros. They are instead a compile-time feature used on the JVM side when generating JavaScript in the more conventional ClojureScript workflow. Making them work in a bootstrapped context is tricky.
It follows the common pattern of a namespace requiring itself to access macros. This fails to load with
cljs.user=> (require 'datascript.core)
#error {:message "Invalid :refer, macro datascript.btset/not== does not exist", :data {:tag :cljs/analysis-error}}
Error: Could not parse ns form datascript.btset
...
Ideas:
make defmacro work normally
intervene on the reader conditional and compile defmacros even though they are tagged :clj
intervene on ns form to turn require-macros into a normal require
The text was updated successfully, but these errors were encountered:
Macros are complicated by the fact that ClojureScript, for historic reasons, does not normally support macros. They are instead a compile-time feature used on the JVM side when generating JavaScript in the more conventional ClojureScript workflow. Making them work in a bootstrapped context is tricky.
The status of
defmacro
:This also makes consuming code from the ecosystem difficult. Consider this datascript snippet:
It follows the common pattern of a namespace requiring itself to access macros. This fails to load with
Ideas:
defmacro
work normallydefmacros
even though they are tagged:clj
require-macros
into a normalrequire
The text was updated successfully, but these errors were encountered: