summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2022-01-17 09:54:00 -0800
committerGreg Becker <becker33@llnl.gov>2022-02-16 10:17:18 -0800
commit800ed16e7a3b95b15f831a26b92c753e43934b65 (patch)
tree0b26381e9173ad879ddc393e9080a6e9a1ae2d24 /etc
parent1903e45eec3673e2e6f1d3341f61748e8bfba55a (diff)
downloadspack-800ed16e7a3b95b15f831a26b92c753e43934b65.tar.gz
spack-800ed16e7a3b95b15f831a26b92c753e43934b65.tar.bz2
spack-800ed16e7a3b95b15f831a26b92c753e43934b65.tar.xz
spack-800ed16e7a3b95b15f831a26b92c753e43934b65.zip
config: add a new `concretizer` config section
The concretizer is going to grow to have many more configuration, and we really need some structured config for that. * We have the `config:concretizer` option that chooses the solver, but extending that is awkward (we'd need to replace a string with a `dict`) and the solver choice will be deprecated eventually. * We have the `concretization` option in environments, but it's not a top-level config section -- it's just for environments, and it also only admits a string right now. To avoid overlapping with either of these and to allow the most extensibility in the future, this adds a new `concretizer` config section that can be used in and outside of environments. There is only one option right now: `reuse`. This can expand to include other options later. Likely, we will soon deprecate `config:concretizer` and warn when the user doesn't use `clingo`, and we will eventually (sometime later) move the `together` / `separately` options from `concretization` into the top-level `concretizer` section. This commit just adds the new section and schema. Fully wiring it up is TBD.
Diffstat (limited to 'etc')
-rw-r--r--etc/spack/defaults/concretizer.yaml17
-rw-r--r--etc/spack/defaults/config.yaml11
2 files changed, 24 insertions, 4 deletions
diff --git a/etc/spack/defaults/concretizer.yaml b/etc/spack/defaults/concretizer.yaml
new file mode 100644
index 0000000000..52200062c8
--- /dev/null
+++ b/etc/spack/defaults/concretizer.yaml
@@ -0,0 +1,17 @@
+# -------------------------------------------------------------------------
+# This is the default spack configuration file.
+#
+# Settings here are versioned with Spack and are intended to provide
+# sensible defaults out of the box. Spack maintainers should edit this
+# file to keep it current.
+#
+# Users can override these settings by editing
+# `$SPACK_ROOT/etc/spack/concretizer.yaml`, `~/.spack/concretizer.yaml`,
+# or by adding a `concretizer:` section to an environment.
+# -------------------------------------------------------------------------
+concretizer:
+ # Whether to consider installed packages or packages from buildcaches when
+ # concretizing specs. If `true`, we'll try to use as many installs/binaries
+ # as possible, rather than building. If `false`, we'll always give you a fresh
+ # concretization.
+ reuse: false
diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml
index eb0d4fc409..d0d3468e8d 100644
--- a/etc/spack/defaults/config.yaml
+++ b/etc/spack/defaults/config.yaml
@@ -155,14 +155,17 @@ config:
# The concretization algorithm to use in Spack. Options are:
#
- # 'original': Spack's original greedy, fixed-point concretizer. This
- # algorithm can make decisions too early and will not backtrack
- # sufficiently for many specs.
- #
# 'clingo': Uses a logic solver under the hood to solve DAGs with full
# backtracking and optimization for user preferences. Spack will
# try to bootstrap the logic solver, if not already available.
#
+ # 'original': Spack's original greedy, fixed-point concretizer. This
+ # algorithm can make decisions too early and will not backtrack
+ # sufficiently for many specs. This will soon be deprecated in
+ # favor of clingo.
+ #
+ # See `concretizer.yaml` for more settings you can fine-tune when
+ # using clingo.
concretizer: clingo