Skip to content

Package requirements: allow single specs in requirement lists#36258

Merged
scheibelp merged 4 commits intospack:developfrom
scheibelp:feature/pkg-require-schema-flexibility
Mar 20, 2023
Merged

Package requirements: allow single specs in requirement lists#36258
scheibelp merged 4 commits intospack:developfrom
scheibelp:feature/pkg-require-schema-flexibility

Conversation

@scheibelp
Copy link
Copy Markdown
Member

@scheibelp scheibelp commented Mar 20, 2023

Without this PR, if you have a list of package requirements like:

packages:
  foo:
    require:
    - x
    - y
    ...

x and y must be one_of or any_of like one_of: [+shared], even if there is just a single item in the one_of list. This PR allows specifying strings as the elements of the require: list like:

packages:
  foo:
    require:
    - @version+shared

This is useful if you are combining packages config from multiple files (if there is only one configuration file, then generally you might as well use require: @version+shared rather than specifying the requirements as a list

@spackbot-app spackbot-app bot added core PR affects Spack core functionality tests General test capability(ies) labels Mar 20, 2023
@scheibelp scheibelp requested a review from alalazo March 20, 2023 17:30
Copy link
Copy Markdown
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the code and LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core PR affects Spack core functionality tests General test capability(ies)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants