From d88cfbd839473ea51c1df805d42f3d95dd467171 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 24 Oct 2024 21:28:38 +0200 Subject: [PATCH] compilers.yaml: require list of strings for modules (#47197) --- lib/spack/spack/compiler.py | 2 +- lib/spack/spack/schema/compilers.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 72d56e590f4..d799ca01ea3 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -290,7 +290,7 @@ def __init__( 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 1df696cda98..c894c2e32e3 100644 --- a/lib/spack/spack/schema/compilers.py +++ b/lib/spack/spack/schema/compilers.py @@ -52,7 +52,10 @@ "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": { "anyOf": [