Add an audit to prevent virtual packages with variants specified#41747
Add an audit to prevent virtual packages with variants specified#41747haampie merged 12 commits intospack:developfrom
Conversation
The package recipe is much more complicated than it needs to be, and tried to work around virtuals - which is effectively working against Spack software model. This needs to be addressed in a later PR
|
@spackbot maintainers |
|
Hi @alalazo! I noticed that the following package(s) don't yet have maintainers:
Are you interested in adopting any of these package(s)? If so, simply add the following to the package class: maintainers("alalazo")If not, could you contact the developers of this package and see if they are interested? You can quickly see who has worked on a package with $ spack blame elkThank you for your help! Please don't add maintainers without their consent. You don't have to be a Spack expert or package developer in order to be a "maintainer," it just gives us a list of users willing to review PRs or debug issues relating to this package. A package can have multiple maintainers; just add a list of GitHub handles of anyone who wants to volunteer. |
|
@patrickb314 can you review this PR? This PR modifies the following package(s), for which you are listed as a maintainer:
|
patrickb314
left a comment
There was a problem hiding this comment.
Makes sense. Thanks for the fix.
|
@alalazo I think this is fine for now but we should also make variants, etc. actually work on virtuals. There are design questions there -- like whether they should be passed directly through (e.g., # map virtual variants to package variants
# they don't have to be the same but it probably makes sense most of the time.
provides("+cuda", when="+cuda")
provides("fortran", when="+fortran")I think it's probably the latter. We should merge this for now, but also take note of the removed lines in these packages and try to express what they're saying in the DSL in the long term. |
|
Automatically passing them through would be great. I agree that the virtual variant should probably explicitly map how it passes through. Is there a list of "standard variant names" somewhere? |
|
@patrickb314: no, but this could be one way to formalize them, at least for virtuals. We have talked about having classes for virtual packages, which could act like contracts and allow us to document what the legal variants, versions, etc. are. We don't have that yet so even this is kind of by convention. We could make a page listing all the variants with well known meanings. |
I agree, and indeed tried to put the same concept briefly in the description. I think we should specify better what virtuals are, and ideally:
Each implementation can then provide a specific version range and set of variants. Also, each implementation might also be able to provide all the values of a virtual variant with the same installation (e.g. if it installs two different libraries to be used under different circumstances). We should discuss this, but I suspect we'll end up formalizing having classes for virtual packages too. |
(in the meantime, this merge request spack/spack#41747 might affect the result of the compilation for the development branch of spack.)
…ck#41747) Currently, a virtual spec is composed of just a name and a version. When a virtual spec contains other components, such as variants, Spack won't emit warnings or errors but will silently drop them - which is unexpected by users.
Includes changes from : - spack/spack#41747 - spack/spack#41003 - spack/spack#41919 - spack/spack#40685 - Add hash for octopus 14 and Update BerkeleyGW dependency version in Octopus package #101 ( done at octopus: Support new version octopus@14 spack/spack#43160) push changes in Disable gdlib #90 (done at octopus: disable gdlib by default spack/spack#43161) - include new maintainer spack/spack#43163
…ck#41747) Currently, a virtual spec is composed of just a name and a version. When a virtual spec contains other components, such as variants, Spack won't emit warnings or errors but will silently drop them - which is unexpected by users.

Currently, a virtual spec is composed of just a name and a version. When a virtual spec contains other components, such as variants, Spack won't emit warnings or errors but will silently drop them - which is unexpected by users.
This PR adds an audit to catch where we use virtual specs with variants, and fixes the directive with the tools we currently have. Some changes, like the one for
fftw-apiare definitely repetitive and should be improved later.