<< Back to previous view

[CLJS-1504] Self-host: Pseudo-namespace for macro namespace analysis metadata Created: 06/Dec/15  Updated: 07/Dec/15  Resolved: 07/Dec/15

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: 1.7.145
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Mike Fikes Assignee: Mike Fikes
Resolution: Completed Votes: 0
Labels: bootstrap

Attachments: Text File CLJS-1504-v1.patch    


Background: A pseudo-name is used for macro namespaces (involving a "$macros" suffix, codified in cljs.analyzer/macro-ns-name).

There is a line that conditionally converts to this pseudo-name when a macro namespace is being required:


But, that line has a simple typo: The keyword should be :macros-ns See its proper use a few lines down here:


Simply correcting this typo is alone insufficient because the undecorated name is expected in places, such as the ns->relpath on this line:


But, by introducing another symbol to hold the pseudo-name for use in the state when used in [::ana/namespaces ns] constructs, analysis metadata for macro namespaces is properly placed in the state, and things like the caching feature begins to work correctly for macro namespaces, and probably other behavior that depends on this becomes correct (perhaps reloading, etc.)

Comment by Mike Fikes [ 07/Dec/15 2:13 PM ]

Attached a "v1" patch that illustrates fixing the typo along with what I suspect is necessary to accommodate its consequences.

Comment by David Nolen [ 07/Dec/15 2:20 PM ]

fixed https://github.com/clojure/clojurescript/commit/e33e554331c555952079d284d822cf16219ac56a

Generated at Sun May 19 16:49:26 CDT 2019 using JIRA 4.4#649-r158309.