From 526f74818cce15714dabc9a213d7f9ab71df7fcf Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 7 Apr 2022 15:47:32 +0200 Subject: [PATCH] environment.py: concretize together by default We have somewhat conflicting defaults, namely `view: true` and `concretization: separately`. This leads to post-install errors when merging different flavors of the same package into the default view. It makes more sense to either disable views or do consistent concretization by default. Our docs hint that `concretization: separately` is aimed at system administrators, of which there are likely fewer. By now there are likely more using environments to just build stuff, given that concretization is slow and spack.lock's are nice. --- lib/spack/docs/environments.rst | 14 +++++++------- lib/spack/spack/environment/environment.py | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst index b18648006e8a3..0883c8d31c583 100644 --- a/lib/spack/docs/environments.rst +++ b/lib/spack/docs/environments.rst @@ -274,17 +274,17 @@ Concretizing ^^^^^^^^^^^^ Once some user specs have been added to an environment, they can be -concretized. *By default specs are concretized separately*, one after -the other. This mode of operation permits to deploy a full -software stack where multiple configurations of the same package -need to be installed alongside each other. Central installations done -at HPC centers by system administrators or user support groups -are a common case that fits in this behavior. -Environments *can also be configured to concretize all +concretized. By default, environments *concretize all the root specs in a self-consistent way* to ensure that each package in the environment comes with a single configuration. This mode of operation is usually what is required by software developers that want to deploy their development environment. +Alternatively, environments can be *concretized separately*. This mode +of operation permits to deploy a full +software stack where multiple configurations of the same package +need to be installed alongside each other. Central installations done +at HPC centers by system administrators or user support groups +are a common case that fits in this behavior. Regardless of which mode of operation has been chosen, the following command will ensure all the root specs are concretized according to the diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 72df9cbfe37ac..c76b8e3288a48 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -766,8 +766,8 @@ def _read_manifest(self, f, raw_yaml=None): self.views = {} # Retrieve the current concretization strategy configuration = config_dict(self.yaml) - # default concretization to separately - self.concretization = configuration.get('concretization', 'separately') + # default concretization to together + self.concretization = configuration.get('concretization', 'together') # Retrieve dev-build packages: self.dev_specs = configuration.get('develop', {})