diff options
author | Andrew W Elble <aweits@rit.edu> | 2020-12-08 09:46:52 -0500 |
---|---|---|
committer | Tamara Dahlgren <dahlgren1@llnl.gov> | 2021-02-17 17:07:24 -0800 |
commit | ab3f1b10db7e9a64338f44ccca515a8356b4c43c (patch) | |
tree | b99703e340e137bd03ec3a781f4344c650540b6b /var | |
parent | 30a9e6462f73aa0a50a9f1455dca3f3657cd9d8e (diff) | |
download | spack-ab3f1b10db7e9a64338f44ccca515a8356b4c43c.tar.gz spack-ab3f1b10db7e9a64338f44ccca515a8356b4c43c.tar.bz2 spack-ab3f1b10db7e9a64338f44ccca515a8356b4c43c.tar.xz spack-ab3f1b10db7e9a64338f44ccca515a8356b4c43c.zip |
concretizer: try hard to obtain all needed variant_possible_value()'s (#20102)
Track all the variant values mentioned when emitting constraints, validate them
and emit a fact that allows them as possible values.
This modification ensures that open-ended variants (variants accepting any string
or any integer) are projected to the finite set of values that are relevant for this
concretization.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent-type/package.py | 16 | ||||
-rw-r--r-- | var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py | 19 |
2 files changed, 35 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent-type/package.py b/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent-type/package.py new file mode 100644 index 0000000000..8b42a82b8d --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent-type/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class SinglevalueVariantDependentType(Package): + """Simple package with one dependency that has a single-valued + variant with values=str""" + + homepage = "http://www.example.com" + url = "http://www.example.com/archive-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('singlevalue-variant fum=nope') diff --git a/var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py b/var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py new file mode 100644 index 0000000000..fa6eca1527 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class SinglevalueVariant(Package): + homepage = "http://www.llnl.gov" + url = "http://www.llnl.gov/mpileaks-1.0.tar.gz" + + version(1.0, 'foobarbaz') + + variant( + 'fum', + description='Single-valued variant with type in values', + default='bar', + values=str, + multi=False + ) |