summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2023-07-19 11:08:51 +0200
committerGitHub <noreply@github.com>2023-07-19 11:08:51 +0200
commita7f2abf9242ad321b410cc2f43b394856facba23 (patch)
tree83e9fc443e677f64ffee9d9f8d7cde1b08638456 /var/spack/repos/builtin.mock
parenta99eaa954150778624f23459bafd49ce0397b099 (diff)
downloadspack-a7f2abf9242ad321b410cc2f43b394856facba23.tar.gz
spack-a7f2abf9242ad321b410cc2f43b394856facba23.tar.bz2
spack-a7f2abf9242ad321b410cc2f43b394856facba23.tar.xz
spack-a7f2abf9242ad321b410cc2f43b394856facba23.zip
Remove `LazyReference` from code (#38944)
A LazyReference object is a reference to an attribute of a lazily evaluated singleton. Its only purpose is to let developers use shorter names to refer to such attribute. This class does more harm than good, as it obfuscates the fact that we are using the attribute of a global object. Also, it can easily go out of sync with the singleton it refers to if, for instance, the singleton is updated but the references are not. This commit removes the LazyReference class entirely, and access the attributes explicitly passing through the global value to which they are attached.
Diffstat (limited to 'var/spack/repos/builtin.mock')
-rw-r--r--var/spack/repos/builtin.mock/packages/old-sbang/package.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/var/spack/repos/builtin.mock/packages/old-sbang/package.py b/var/spack/repos/builtin.mock/packages/old-sbang/package.py
index c82696460d..2f7e8505b0 100644
--- a/var/spack/repos/builtin.mock/packages/old-sbang/package.py
+++ b/var/spack/repos/builtin.mock/packages/old-sbang/package.py
@@ -30,7 +30,7 @@ class OldSbang(Package):
{1}
""".format(
- spack.store.unpadded_root, prefix.bin
+ spack.store.STORE.unpadded_root, prefix.bin
)
with open("%s/sbang-style-1.sh" % self.prefix.bin, "w") as f:
f.write(sbang_style_1)