Please sign in to comment.
CLJS-631: Use ana/namespaces for shadowing vars
The compiler used to be keeping track of namespaces it had emitted and using that atom to determine whether a variable shadowed a declared namespace. If dependent namespaces were emitted before their dependencies, this could result in the dependent file shadowing the names of the not-yet-compiled dependency. This happened both during out-of-order clean compilation and certain instances of incremental compilation. This patch utilizes the analyzer's existing namespaces atom to track loaded namespaces rather than maintaining a separate atom in the compiler. Files are guaranteed to be analyzed in dependency order, so this ensures that all files with valid ns forms will know of the namespaces they need to avoid shadowing and behave accordingly.
- Loading branch information...