concretizer: enable hash reuse with full hash
With the original DAG hash, we did not store build dependencies in the database, but with the full DAG hash, we do. Previously, we'd never tell the concretizer about build dependencies of things used by hash, because we never had them. Now, we have to avoid telling the concretizer about them, or they'll unnecessarily constrain build dependencies for new concretizations. - [x] Make database track all dependencies included in the `dag_hash` - [x] Modify spec_clauses so that build dependency information is optional and off by default. - [x] `spack diff` asks `spec_clauses` for build dependencies for completeness - [x] Modify `concretize.lp` so that reuse optimization doesn't affect fresh installations. - [x] Modify concretizer setup so that it does *not* prioritize installed versions over package versions. We don't need this with reuse, so they're low priority. - [x] Fix `test_installed_deps` for full hash and new concretizer (does not work for old concretizer with full hash -- leave this for later if we need it) - [x] Move `test_installed_deps` mock packages to `builtin.mock` for easier debugging with `spack -m`. - [x] Fix `test_reuse_installed_packages_when_package_def_changes` for full hash
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class InstalledDepsA(Package):
|
||||
"""Used by test_installed_deps test case."""
|
||||
# a
|
||||
# / \
|
||||
# b c b --> d build/link
|
||||
# |\ /| b --> e build/link
|
||||
# |/ \| c --> d build
|
||||
# d e c --> e build/link
|
||||
|
||||
homepage = "http://www.example.com"
|
||||
url = "http://www.example.com/a-1.0.tar.gz"
|
||||
|
||||
version("1", "0123456789abcdef0123456789abcdef")
|
||||
version("2", "abcdef0123456789abcdef0123456789")
|
||||
version("3", "def0123456789abcdef0123456789abc")
|
||||
|
||||
depends_on("installed-deps-b", type=("build", "link"))
|
||||
depends_on("installed-deps-c", type=("build", "link"))
|
@@ -0,0 +1,26 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class InstalledDepsB(Package):
|
||||
"""Used by test_installed_deps test case."""
|
||||
# a
|
||||
# / \
|
||||
# b c b --> d build/link
|
||||
# |\ /| b --> e build/link
|
||||
# |/ \| c --> d build
|
||||
# d e c --> e build/link
|
||||
|
||||
homepage = "http://www.example.com"
|
||||
url = "http://www.example.com/b-1.0.tar.gz"
|
||||
|
||||
version("1", "0123456789abcdef0123456789abcdef")
|
||||
version("2", "abcdef0123456789abcdef0123456789")
|
||||
version("3", "def0123456789abcdef0123456789abc")
|
||||
|
||||
depends_on("installed-deps-d", type=("build", "link"))
|
||||
depends_on("installed-deps-e", type=("build", "link"))
|
@@ -0,0 +1,26 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class InstalledDepsC(Package):
|
||||
"""Used by test_installed_deps test case."""
|
||||
# a
|
||||
# / \
|
||||
# b c b --> d build/link
|
||||
# |\ /| b --> e build/link
|
||||
# |/ \| c --> d build
|
||||
# d e c --> e build/link
|
||||
|
||||
homepage = "http://www.example.com"
|
||||
url = "http://www.example.com/c-1.0.tar.gz"
|
||||
|
||||
version("1", "0123456789abcdef0123456789abcdef")
|
||||
version("2", "abcdef0123456789abcdef0123456789")
|
||||
version("3", "def0123456789abcdef0123456789abc")
|
||||
|
||||
depends_on("installed-deps-d@2", type="build")
|
||||
depends_on("installed-deps-e@2", type=("build", "link"))
|
@@ -0,0 +1,23 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class InstalledDepsD(Package):
|
||||
"""Used by test_installed_deps test case."""
|
||||
# a
|
||||
# / \
|
||||
# b c b --> d build/link
|
||||
# |\ /| b --> e build/link
|
||||
# |/ \| c --> d build
|
||||
# d e c --> e build/link
|
||||
|
||||
homepage = "http://www.example.com"
|
||||
url = "http://www.example.com/d-1.0.tar.gz"
|
||||
|
||||
version("1", "0123456789abcdef0123456789abcdef")
|
||||
version("2", "abcdef0123456789abcdef0123456789")
|
||||
version("3", "def0123456789abcdef0123456789abc")
|
@@ -0,0 +1,23 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class InstalledDepsE(Package):
|
||||
"""Used by test_installed_deps test case."""
|
||||
# a
|
||||
# / \
|
||||
# b c b --> d build/link
|
||||
# |\ /| b --> e build/link
|
||||
# |/ \| c --> d build
|
||||
# d e c --> e build/link
|
||||
|
||||
homepage = "http://www.example.com"
|
||||
url = "http://www.example.com/e-1.0.tar.gz"
|
||||
|
||||
version("1", "0123456789abcdef0123456789abcdef")
|
||||
version("2", "abcdef0123456789abcdef0123456789")
|
||||
version("3", "def0123456789abcdef0123456789abc")
|
Reference in New Issue
Block a user