Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(maint) Compare Environment#name in compiler
During catalog compilation, after loading the requested environment we load the node and server specified environment. Previously, We would then compare the Environment objects to determine if the requested environment matched the server specified environment. However, if the environment cache is flushed between those two environments being loaded they could be different object instances representing the same desired environment. Environment objects define a `==` method but require the name and modulepath to be the same. If we are running with versioned environment dirs those modulepaths may be different (ie different versions of the same environment). To resolve this race condition we now check the environment names (Environment#name canoncalizes to symbols to avoid symbol/string mismatch). The catalog already uses the server specified environment which, if we are running with versioned environment dirs and have different versions of the same environment, will be the most up to date version of the environment.
- Loading branch information