Skip to content

Commit

Permalink
Warn about removal of deprecated format strings (spack#33829)
Browse files Browse the repository at this point in the history
Co-authored-by: becker33 <becker33@users.noreply.github.com>
  • Loading branch information
becker33 and becker33 authored Nov 22, 2022
1 parent 793a7bc commit 7f9af8d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions etc/spack/defaults/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
binary_index_ttl: 600
5 changes: 4 additions & 1 deletion lib/spack/spack/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -4418,7 +4418,10 @@ def old_format(self, format_string="$_$@$%@+$+$=", **kwargs):
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
Expand Down
2 changes: 1 addition & 1 deletion lib/spack/spack/test/directory_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions share/spack/qa/configuration/windows_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- ~/.spack/stage

0 comments on commit 7f9af8d

Please sign in to comment.