Environments: unify the spec objects on first concretization (#29948)

Currently environments are indexed by build hashes. When looking into this bug I noticed there is a disconnect between environments that are concretized in memory for the first time and environments that are read from a `spack.lock`. The issue is that specs read from a `spack.lock` don't have a full hash, since they are indexed by a build hash which is strictly coarser. They are also marked "final" as they are read from a file, so we can't compute additional hashes. 

This bugfix PR makes "first concretization" equivalent to re-reading the specs from a corresponding `spack.lock`, and doing so unveiled a few tests were we were making wrong assumptions and relying on the fact that a `spack.lock` file was not there already.

* Add unit test
* Modify mpich to trigger jobs in pipelines
* Fix two failing unit tests
* Fix another full_hash vs. build_hash mismatch in tests
This commit is contained in:
Massimiliano Culpo
2022-04-08 23:26:17 +02:00
committed by GitHub
parent dfff935f17
commit 23e85f4086
5 changed files with 43 additions and 9 deletions

View File

@@ -174,10 +174,10 @@ class Mpich(AutotoolsPackage):
depends_on('argobots', when='+argobots')
# building from git requires regenerating autotools files
depends_on('automake@1.15:', when='@develop', type=("build"))
depends_on('libtool@2.4.4:', when='@develop', type=("build"))
depends_on("m4", when="@develop", type=("build")),
depends_on("autoconf@2.67:", when='@develop', type=("build"))
depends_on('automake@1.15:', when='@develop', type='build')
depends_on('libtool@2.4.4:', when='@develop', type='build')
depends_on("m4", when="@develop", type='build'),
depends_on("autoconf@2.67:", when='@develop', type='build')
# building with "+hwloc' also requires regenerating autotools files
depends_on('automake@1.15:', when='@3.3:3.3.99 +hwloc', type="build")