summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2022-11-22 03:56:57 -0600
committerGitHub <noreply@github.com>2022-11-22 10:56:57 +0100
commit7f9af8d4a0bfbb1577e5ac9982624d8d0cb9b9ca (patch)
treebc2b35403b0bbf1b23968404239f9d771d898ce2
parent793a7bc6a97d86b9b0a6da32c0e3694ddeaa6590 (diff)
downloadspack-7f9af8d4a0bfbb1577e5ac9982624d8d0cb9b9ca.tar.gz
spack-7f9af8d4a0bfbb1577e5ac9982624d8d0cb9b9ca.tar.bz2
spack-7f9af8d4a0bfbb1577e5ac9982624d8d0cb9b9ca.tar.xz
spack-7f9af8d4a0bfbb1577e5ac9982624d8d0cb9b9ca.zip
Warn about removal of deprecated format strings (#33829)
Co-authored-by: becker33 <becker33@users.noreply.github.com>
-rw-r--r--etc/spack/defaults/config.yaml4
-rw-r--r--lib/spack/spack/spec.py5
-rw-r--r--lib/spack/spack/test/directory_layout.py2
-rw-r--r--share/spack/qa/configuration/windows_config.yaml4
4 files changed, 9 insertions, 6 deletions
diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml
index b3356428fe..ee1cb0a324 100644
--- a/etc/spack/defaults/config.yaml
+++ b/etc/spack/defaults/config.yaml
@@ -19,7 +19,7 @@ config:
install_tree:
root: $spack/opt/spack
projections:
- all: "${ARCHITECTURE}/${COMPILERNAME}-${COMPILERVER}/${PACKAGE}-${VERSION}-${HASH}"
+ all: "${architecture}/${compiler.name}-${compiler.version}/${name}-${version}-${hash}"
# install_tree can include an optional padded length (int or boolean)
# default is False (do not pad)
# if padded_length is True, Spack will pad as close to the system max path
@@ -214,4 +214,4 @@ config:
# Number of seconds a buildcache's index.json is cached locally before probing
# for updates, within a single Spack invocation. Defaults to 10 minutes.
- binary_index_ttl: 600 \ No newline at end of file
+ binary_index_ttl: 600
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 5c688d916f..1995009381 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -4418,7 +4418,10 @@ class Spec(object):
TODO: allow, e.g., ``$6#`` to customize short hash length
TODO: allow, e.g., ``$//`` for full hash.
"""
-
+ tty.warn(
+ "Using the old Spec.format method."
+ " This method was deprecated in Spack v0.15 and will be removed in Spack v0.20"
+ )
color = kwargs.get("color", False)
# Dictionary of transformations for named tokens
diff --git a/lib/spack/spack/test/directory_layout.py b/lib/spack/spack/test/directory_layout.py
index 86d160c5cc..80d4db2071 100644
--- a/lib/spack/spack/test/directory_layout.py
+++ b/lib/spack/spack/test/directory_layout.py
@@ -59,7 +59,7 @@ def test_yaml_directory_layout_parameters(tmpdir, default_mock_concretization):
arch_scheme = (
"{architecture.platform}/{architecture.target}/{architecture.os}/{name}/{version}/{hash:7}"
)
- ns_scheme = "${ARCHITECTURE}/${NAMESPACE}/${PACKAGE}-${VERSION}-${HASH:7}"
+ ns_scheme = "${architecture}/${namespace}/${name}-${version}-${hash:7}"
arch_ns_scheme_projections = {"all": arch_scheme, "python": ns_scheme}
layout_arch_ns = DirectoryLayout(str(tmpdir), projections=arch_ns_scheme_projections)
diff --git a/share/spack/qa/configuration/windows_config.yaml b/share/spack/qa/configuration/windows_config.yaml
index fb90000223..a51cd110d1 100644
--- a/share/spack/qa/configuration/windows_config.yaml
+++ b/share/spack/qa/configuration/windows_config.yaml
@@ -3,6 +3,6 @@ config:
install_tree:
root: $spack\opt\spack
projections:
- all: '${ARCHITECTURE}\${COMPILERNAME}-${COMPILERVER}\${PACKAGE}-${VERSION}-${HASH}'
+ all: '${architecture}\${compiler.name}-${compiler.version}\${name}-${version}-${hash}'
build_stage:
- - ~/.spack/stage \ No newline at end of file
+ - ~/.spack/stage