From d900ac2003a39d1789ee62107e3fc2c6e2d8a78f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 13 May 2022 18:11:10 +0200 Subject: Reuse concretization by default (#30396) * Enable reuse by default in Spack * Update documentation to match new default * Configure pipelines not to reuse software --- lib/spack/docs/basic_usage.rst | 38 +++++++++++++++++++------------------- lib/spack/docs/build_settings.rst | 7 +------ 2 files changed, 20 insertions(+), 25 deletions(-) (limited to 'lib') 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 ` 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 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 -- cgit v1.2.3-60-g2f50