Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audit: detect self-referential depends_on #42456

Merged

Conversation

alalazo
Copy link
Member

@alalazo alalazo commented Feb 2, 2024

fixes #42427

This PR detects self referential dependencies in our builtin repository, of the form:

depends_on("foo ...", when="^foo ...")

Directives of this form may be an issue, in particular when used for virtuals, see #42427. In general, they ought to be rewritten either by specifying the virtual they provide:

depends_on("foo ...", when="^[virtuals=vname] foo ...")

or resorting to other directives (like requires or conflicts) which cannot add a new dependency.

All the issues pointed out by this audit, when it was a draft, have been fixed already in separate PRs.

@alalazo alalazo force-pushed the audit/detect-self-referential-dependencies branch from 334e5a3 to 3a82316 Compare February 12, 2024 08:24
@alalazo alalazo marked this pull request as ready for review February 12, 2024 08:30
@haampie haampie merged commit cb3c014 into spack:develop Feb 12, 2024
33 of 34 checks passed
@haampie
Copy link
Member

haampie commented Feb 12, 2024

Hitting this issue makes code cov go up ;)

@alalazo alalazo deleted the audit/detect-self-referential-dependencies branch February 12, 2024 20:56
mathomp4 pushed a commit to mathomp4/spack that referenced this pull request Mar 27, 2024
teaguesterling pushed a commit to teaguesterling/spack that referenced this pull request Jun 15, 2024
kwryankrattiger pushed a commit to kwryankrattiger/spack that referenced this pull request Jul 9, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple virtual providers are pulled into the same spec graph in some circumstances
2 participants