diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-07-13 01:45:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-12 19:45:24 -0400 |
commit | 7f2b5e8e570cc1c6f783af80de083bde7c1ffc8c (patch) | |
tree | e60261f7ce32012081911a09ecf7712005af813e /LICENSE-APACHE | |
parent | 6ceb274de035d42fc55822b2753a979355cd8af0 (diff) | |
download | spack-7f2b5e8e570cc1c6f783af80de083bde7c1ffc8c.tar.gz spack-7f2b5e8e570cc1c6f783af80de083bde7c1ffc8c.tar.bz2 spack-7f2b5e8e570cc1c6f783af80de083bde7c1ffc8c.tar.xz spack-7f2b5e8e570cc1c6f783af80de083bde7c1ffc8c.zip |
`spack.repo.get()` can only be called on concrete specs (#31411)
The goal of this PR is to make clearer where we need a package object in Spack as opposed to a package class.
We currently instantiate a lot of package objects when we could make do with a class. We should use the class
when we only need metadata, and we should only instantiate and us an instance of `PackageBase` at build time.
Modifications:
- [x] Remove the `spack.repo.get` convenience function (which was used in many places, and not really needed)
- [x] Use `spack.repo.path.get_pkg_class` wherever possible
- [x] Try to route most of the need for `spack.repo.path.get` through `Spec.package`
- [x] Introduce a non-data descriptor, that can be used as a decorator, to have "class level properties"
- [x] Refactor unit tests that had to be modified to reduce code duplication
- [x] `Spec.package` and `Repo.get` now require a concrete spec as input
- [x] Remove `RepoPath.all_packages` and `Repo.all_packages`
Diffstat (limited to 'LICENSE-APACHE')
0 files changed, 0 insertions, 0 deletions