group by package
This commit is contained in:
parent
f32a756800
commit
908095e865
@ -1223,6 +1223,7 @@ def _when_conditions_are_satisfiable_by_some_version(pkgs, error_cls):
|
|||||||
range = spack.version.VersionRange(
|
range = spack.version.VersionRange(
|
||||||
min(pkg_cls.versions), spack.version.StandardVersion.typemax()
|
min(pkg_cls.versions), spack.version.StandardVersion.typemax()
|
||||||
)
|
)
|
||||||
|
details = []
|
||||||
for attr in attrs:
|
for attr in attrs:
|
||||||
if attr == "patches":
|
if attr == "patches":
|
||||||
# Patches should strictly apply to some known version
|
# Patches should strictly apply to some known version
|
||||||
@ -1239,12 +1240,14 @@ def _when_conditions_are_satisfiable_by_some_version(pkgs, error_cls):
|
|||||||
unsatisfiable = [
|
unsatisfiable = [
|
||||||
when for when in getattr(pkg_cls, attr) if not range.intersects(when.versions)
|
when for when in getattr(pkg_cls, attr) if not range.intersects(when.versions)
|
||||||
]
|
]
|
||||||
if unsatisfiable:
|
details.extend(f'when="{x}"' for x in unsatisfiable)
|
||||||
|
|
||||||
|
if details:
|
||||||
errors.append(
|
errors.append(
|
||||||
error_cls(
|
error_cls(
|
||||||
summary=f"{filename}: `{attr}` when conditions are not satisfiable by "
|
summary=f"{filename}: `{attr}` when conditions are not satisfiable by "
|
||||||
f"any known version of {pkg_cls.name}",
|
f"any known version of {pkg_cls.name}",
|
||||||
details=[f'when="{x}"' for x in unsatisfiable],
|
details=details,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user