Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

A CLJS macro may want to access the metadata of the current ns via * .

Changes to the ns metadata are not reflected back the * } var when re-compiling a namespace, the metadata of the first compile will remain. This is due to the analyzer always calling {{create-ns}} but never updating the meta. It should probably be updated inside {{parse 'ns}} (link: 1). Clojure always resets the metadata via the {{ns}} macro.

One potential conflict is when a {{.clj}} and a {{.cljs}} file exist for the same namespace and both provide different metadata. Both platforms reseting the meta is probably not ideal, maybe we should {{vary-meta merge}} instead?

(link: 1) https://github.com/clojure/clojurescript/blob/94b4e9cdc845c1345d28f8e1a339189bd3de6971/src/main/clojure/cljs/analyzer.cljc#L2312

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-1926 (reported by thheller)
...