summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2022-05-06 22:02:50 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2022-05-13 10:45:12 -0700
commit521c2060304474aa5f7755d8ed07af4b84e30dbf (patch)
treea3f106574728c4f190493bd870a498fd8c670fc8 /var
parent15eb98368d2453ab5cbfbdf4675c4c7e99b022d4 (diff)
downloadspack-521c2060304474aa5f7755d8ed07af4b84e30dbf.tar.gz
spack-521c2060304474aa5f7755d8ed07af4b84e30dbf.tar.bz2
spack-521c2060304474aa5f7755d8ed07af4b84e30dbf.tar.xz
spack-521c2060304474aa5f7755d8ed07af4b84e30dbf.zip
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
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/installed-deps-a/package.py26
-rw-r--r--var/spack/repos/builtin.mock/packages/installed-deps-b/package.py26
-rw-r--r--var/spack/repos/builtin.mock/packages/installed-deps-c/package.py26
-rw-r--r--var/spack/repos/builtin.mock/packages/installed-deps-d/package.py23
-rw-r--r--var/spack/repos/builtin.mock/packages/installed-deps-e/package.py23
5 files changed, 124 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/installed-deps-a/package.py b/var/spack/repos/builtin.mock/packages/installed-deps-a/package.py
new file mode 100644
index 0000000000..c3b4d67d74
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/installed-deps-a/package.py
@@ -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"))
diff --git a/var/spack/repos/builtin.mock/packages/installed-deps-b/package.py b/var/spack/repos/builtin.mock/packages/installed-deps-b/package.py
new file mode 100644
index 0000000000..66c24d9c31
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/installed-deps-b/package.py
@@ -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"))
diff --git a/var/spack/repos/builtin.mock/packages/installed-deps-c/package.py b/var/spack/repos/builtin.mock/packages/installed-deps-c/package.py
new file mode 100644
index 0000000000..703245d5b8
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/installed-deps-c/package.py
@@ -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"))
diff --git a/var/spack/repos/builtin.mock/packages/installed-deps-d/package.py b/var/spack/repos/builtin.mock/packages/installed-deps-d/package.py
new file mode 100644
index 0000000000..b2e4bb41f8
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/installed-deps-d/package.py
@@ -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")
diff --git a/var/spack/repos/builtin.mock/packages/installed-deps-e/package.py b/var/spack/repos/builtin.mock/packages/installed-deps-e/package.py
new file mode 100644
index 0000000000..7ae70d9bd0
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/installed-deps-e/package.py
@@ -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")