summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-10-24 21:28:38 +0200
committerGitHub <noreply@github.com>2024-10-24 13:28:38 -0600
commit5ac2b8a178a47d9073918dc6014d41f48f393a29 (patch)
tree8e96d6d3d161aae56636aec8397acc46c1ab66f3 /lib
parentb063765c2efecb7937d9f6bbbbb34cd41efd1286 (diff)
downloadspack-5ac2b8a178a47d9073918dc6014d41f48f393a29.tar.gz
spack-5ac2b8a178a47d9073918dc6014d41f48f393a29.tar.bz2
spack-5ac2b8a178a47d9073918dc6014d41f48f393a29.tar.xz
spack-5ac2b8a178a47d9073918dc6014d41f48f393a29.zip
compilers.yaml: require list of strings for modules (#47197)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compiler.py2
-rw-r--r--lib/spack/spack/schema/compilers.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py
index 8ed125ae24..31067a14d9 100644
--- a/lib/spack/spack/compiler.py
+++ b/lib/spack/spack/compiler.py
@@ -275,7 +275,7 @@ class Compiler:
operating_system,
target,
paths,
- modules=None,
+ modules: Optional[List[str]] = None,
alias=None,
environment=None,
extra_rpaths=None,
diff --git a/lib/spack/spack/schema/compilers.py b/lib/spack/spack/schema/compilers.py
index 976a9777fc..8146088210 100644
--- a/lib/spack/spack/schema/compilers.py
+++ b/lib/spack/spack/schema/compilers.py
@@ -61,7 +61,10 @@ properties: Dict[str, Any] = {
"target": {"type": "string"},
"alias": {"anyOf": [{"type": "string"}, {"type": "null"}]},
"modules": {
- "anyOf": [{"type": "string"}, {"type": "null"}, {"type": "array"}]
+ "anyOf": [
+ {"type": "null"},
+ {"type": "array", "items": {"type": "string"}},
+ ]
},
"implicit_rpaths": implicit_rpaths,
"environment": spack.schema.environment.definition,