Skip to content

concretizer: make rules on virtual packages more linear#20680

Merged
tgamblin merged 1 commit intospack:developfrom
alalazo:fixes/iconv_provider_and_libc
Jan 6, 2021
Merged

concretizer: make rules on virtual packages more linear#20680
tgamblin merged 1 commit intospack:developfrom
alalazo:fixes/iconv_provider_and_libc

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Jan 5, 2021

fixes #20679

In this refactor we have a single cardinality rule on the provider, which triggers a rule transforming a dependency on a virtual package into a dependency on the provider of the virtual.

fixes spack#20679

In this refactor we have a single cardinality rule on the
provider, which triggers a rule transforming a dependency
on a virtual package into a dependency on the provider of
the virtual.
@alalazo alalazo added concretization bugfix Something wasn't working, here's a fix labels Jan 5, 2021
% if you declare a dependency on a virtual AND the package is not an external,
% you depend on one of its providers
1 {
depends_on(Package, Provider, Type) : possible_provider(Provider, Virtual)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the gist of the issue: we shouldn't use possible_provider since we don't know if the possible provider is actually a provider. For some reasons in #20679 libiconv was selected as the iconv provider to satisfy the link dependency, while libc was selected to satisfy the build dependency without being a provider of anything (but being a possible provider of iconv).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For the record: I spent a couple of hours trying to come up with a reproducer for tests, but I was not able to find one (while I am able to reproduce the issue reported in #20679 on the command line).

Copy link
Copy Markdown
Member

@haampie haampie left a comment

Choose a reason for hiding this comment

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

Can confirm this solves my issue

@alalazo alalazo marked this pull request as ready for review January 5, 2021 17:38
@tgamblin tgamblin merged commit 0111a18 into spack:develop Jan 6, 2021
@alalazo alalazo deleted the fixes/iconv_provider_and_libc branch January 6, 2021 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something wasn't working, here's a fix concretization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-declared dependency attached by the ASP solver

4 participants