rebase fixup

Signed-off-by: Gregory Becker <becker33@llnl.gov>
This commit is contained in:
Gregory Becker 2025-05-14 17:44:29 -07:00
parent f27eb55f29
commit 2c2282dcb4
No known key found for this signature in database
GPG Key ID: 2362541F6D14ED84
2 changed files with 5 additions and 5 deletions

View File

@ -286,7 +286,7 @@ def add_dependency(dep, **edge_properties):
raise SpecParsingError(str(e), self.ctx.current_token, self.literal_str) from e
# Get toolchain information outside of loop
toolchains = spack.config.get("toolchains", {})
toolchains = spack.config.CONFIG.get("toolchains", {})
initial_spec = initial_spec or spack.spec.Spec()
root_spec, parser_warnings = SpecNodeParser(self.ctx, self.literal_str).parse(initial_spec)
@ -319,11 +319,11 @@ def add_dependency(dep, **edge_properties):
elif self.ctx.accept(SpecTokens.DEPENDENCY):
# String replacement for toolchains
# Look ahead to match upcoming value to list of toolchains
if self.next_token.value in toolchains:
if self.ctx.next_token.value in toolchains:
assert self.ctx.accept(SpecTokens.UNQUALIFIED_PACKAGE_NAME)
# accepting the token advances it to the current token
# accepting the token advances it to be the current token
# Push associated tokens back to the TokenContext
self.ctx.push(parseable_tokens(toolchains[self.current_token.value]))
self.ctx.push(parseable_tokens(toolchains[self.ctx.current_token.value]))
continue
is_direct = self.ctx.current_token.value[0] == "%"

View File

@ -2054,7 +2054,7 @@ def shell_as(shell):
@pytest.fixture()
def nullify_globals(request, monkeypatch):
ensure_configuration_fixture_run_before(request)
monkeypatch.setattr(spack.config, "CONFIG", None)
monkeypatch.setattr(spack.config, "CONFIG", {}) # So basic get operations do not throw
monkeypatch.setattr(spack.caches, "MISC_CACHE", None)
monkeypatch.setattr(spack.caches, "FETCH_CACHE", None)
monkeypatch.setattr(spack.repo, "PATH", None)