summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-05-13 18:11:10 +0200
committerGitHub <noreply@github.com>2022-05-13 09:11:10 -0700
commitd900ac2003a39d1789ee62107e3fc2c6e2d8a78f (patch)
treee5cf98ba6de81865513e76615027e55a6b032400 /lib
parentfaa277778e290cb9815269034029cc777162e774 (diff)
downloadspack-d900ac2003a39d1789ee62107e3fc2c6e2d8a78f.tar.gz
spack-d900ac2003a39d1789ee62107e3fc2c6e2d8a78f.tar.bz2
spack-d900ac2003a39d1789ee62107e3fc2c6e2d8a78f.tar.xz
spack-d900ac2003a39d1789ee62107e3fc2c6e2d8a78f.zip
Reuse concretization by default (#30396)
* Enable reuse by default in Spack * Update documentation to match new default * Configure pipelines not to reuse software
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/basic_usage.rst38
-rw-r--r--lib/spack/docs/build_settings.rst7
2 files changed, 20 insertions, 25 deletions
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index 96fee4a125..7a3c44a759 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -192,32 +192,32 @@ you can use them to customize an installation in :ref:`sec-specs`.
Reusing installed dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-.. warning::
-
- The ``--reuse`` option described here will become the default installation
- method in the next Spack version, and you will be able to get the current
- behavior by using ``spack install --fresh``.
+By default, when you run ``spack install``, Spack tries hard to reuse existing installations
+as dependencies, either from a local store or from remote buildcaches if configured.
+This minimizes unwanted rebuilds of common dependencies, in particular if
+you update Spack frequently.
-By default, when you run ``spack install``, Spack tries to build a new
-version of the package you asked for, along with updated versions of
-its dependencies. This gets you the latest versions and configurations,
-but it can result in unwanted rebuilds if you update Spack frequently.
-
-If you want Spack to try hard to reuse existing installations as dependencies,
-you can add the ``--reuse`` option:
+In case you want the latest versions and configurations to be installed instead,
+you can add the ``--fresh`` option:
.. code-block:: console
- $ spack install --reuse mpich
+ $ spack install --fresh mpich
+
+Reusing installations in this mode is "accidental", and happening only if
+there's a match between existing installations and what Spack would have installed
+anyhow.
-This will not do anything if ``mpich`` is already installed. If ``mpich``
-is not installed, but dependencies like ``hwloc`` and ``libfabric`` are,
-the ``mpich`` will be build with the installed versions, if possible.
-You can use the :ref:`spack spec -I <cmd-spack-spec>` command to see what
+You can use the ``spack spec -I mpich`` command to see what
will be reused and what will be built before you install.
-You can configure Spack to use the ``--reuse`` behavior by default in
-``concretizer.yaml``.
+You can configure Spack to use the ``--fresh`` behavior by default in
+``concretizer.yaml``:
+
+.. code-block:: yaml
+
+ concretizer:
+ reuse: false
.. _cmd-spack-uninstall:
diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst
index 3b49375b30..568b92aac3 100644
--- a/lib/spack/docs/build_settings.rst
+++ b/lib/spack/docs/build_settings.rst
@@ -242,12 +242,7 @@ to enable reuse for a single installation, and you can use:
spack install --fresh <spec>
to do a fresh install if ``reuse`` is enabled by default.
-
-.. note::
-
- ``reuse: false`` is the current default, but ``reuse: true`` will be the default
- in the next Spack release. You will still be able to use ``spack install --fresh``
- to get the old behavior.
+``reuse: true`` is the default.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Selection of the target microarchitectures