Changes to namespace metadata are not properly transferred to *ns* dynamic var
Description
A CLJS macro may want to access the metadata of the current ns via (meta ns).
Changes to the ns metadata are not reflected back the ns 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 [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?
A CLJS macro may want to access the metadata of the current ns via
(meta
ns)
.Changes to the ns metadata are not reflected back the ns 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 insideparse 'ns
[1]. Clojure always resets the metadata via thens
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 shouldvary-meta merge
instead?[1] https://github.com/clojure/clojurescript/blob/94b4e9cdc845c1345d28f8e1a339189bd3de6971/src/main/clojure/cljs/analyzer.cljc#L2312