Fix for compiler search and conversion from compilers.yaml

* Don't write to platform scope
* Remove leftover print about compilers.yaml
* Avoid merging all the scopes when writing compilers
This commit is contained in:
Massimiliano Culpo 2025-01-23 22:04:48 +01:00
parent e0d889fb91
commit 42c5cc4dc8
No known key found for this signature in database
GPG Key ID: 3E52BB992233066C
3 changed files with 2 additions and 5 deletions

View File

@ -47,7 +47,7 @@ def setup_parser(subparser):
find_parser.add_argument(
"--scope",
action=arguments.ConfigScope,
default=lambda: spack.config.default_modify_scope("compilers"),
default=lambda: spack.config.default_modify_scope("packages"),
help="configuration scope to modify",
)
arguments.add_common_arguments(find_parser, ["jobs"])

View File

@ -49,10 +49,6 @@ def compiler_config_files():
if from_packages_yaml:
config_files.append(configuration.get_config_filename(name, "packages"))
compiler_config = configuration.get("compilers", scope=name)
if compiler_config:
config_files.append(configuration.get_config_filename(name, "compilers"))
return config_files

View File

@ -224,6 +224,7 @@ def update_configuration(
pkg_config["buildable"] = False
pkg_to_cfg[package_name] = pkg_config
scope = scope or spack.config.default_modify_scope()
pkgs_cfg = spack.config.get("packages", scope=scope)
pkgs_cfg = spack.schema.merge_yaml(pkgs_cfg, pkg_to_cfg)
spack.config.set("packages", pkgs_cfg, scope=scope)