Skip to content

concretizer: fix direct dep w/ virtuals issue#51037

Merged
becker33 merged 1 commit intodevelopfrom
hs/fix/direct-dependency-virtual
Jul 24, 2025
Merged

concretizer: fix direct dep w/ virtuals issue#51037
becker33 merged 1 commit intodevelopfrom
hs/fix/direct-dependency-virtual

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Jul 23, 2025

Closes #51019.

The following (questionable but valid) config

packages:
  all:
    prefer:
    - "%c=gcc"
    - "%cxx=gcc"
    - "%fortran=gcc"

exposes an issue in the solver where the "requirement weight" is
computed incorrectly.

It hallucinates makes up the following statement:

attr("direct_dependency",node(0,"tmux"),node_requirement("virtual_on_incoming_edges","gcc","cxx"))

even though tmux does not depend on cxx.

This leads to condition_holds for %cxx=gcc, even though this virtual
does not end up as a dependency of tmux in the solution.

@haampie haampie force-pushed the hs/fix/direct-dependency-virtual branch from c6a333e to fb0b533 Compare July 23, 2025 13:22
@haampie haampie added the v1.0.1 PRs to backport for v1.0.1 label Jul 23, 2025
The following config

```yaml
packages:
  all:
    prefer:
    - "%c=gcc"
    - "%cxx=gcc"
    - "%fortran=gcc"
```

exposes an issue in the solver where the "requirement weight" is
computed incorrectly.

It makes up the following statement:

```
attr("direct_dependency",node(0,"tmux"),node_requirement("virtual_on_incoming_edges","gcc","cxx"))
```

even though `tmux` does not depend on `cxx`.

This leads to `condition_holds` for `%cxx=gcc`, even though this virtual
does not end as a dependency of `tmux` in the solution.

Signed-off-by: Harmen Stoppels <[email protected]>
@haampie haampie force-pushed the hs/fix/direct-dependency-virtual branch from fb0b533 to 43c064d Compare July 23, 2025 13:39
@becker33 becker33 merged commit 228053a into develop Jul 24, 2025
32 checks passed
@becker33 becker33 deleted the hs/fix/direct-dependency-virtual branch July 24, 2025 11:16
haampie added a commit that referenced this pull request Jul 29, 2025
The following config

```yaml
packages:
  all:
    prefer:
    - "%c=gcc"
    - "%cxx=gcc"
    - "%fortran=gcc"
```

exposes an issue in the solver where the "requirement weight" is
computed incorrectly.

It makes up the following statement:

```
attr("direct_dependency",node(0,"tmux"),node_requirement("virtual_on_incoming_edges","gcc","cxx"))
```

even though `tmux` does not depend on `cxx`.

This leads to `condition_holds` for `%cxx=gcc`, even though this virtual
does not end as a dependency of `tmux` in the solution.

Signed-off-by: Harmen Stoppels <[email protected]>
@haampie haampie mentioned this pull request Jul 29, 2025
29 tasks
haampie added a commit that referenced this pull request Jul 29, 2025
The following config

```yaml
packages:
  all:
    prefer:
    - "%c=gcc"
    - "%cxx=gcc"
    - "%fortran=gcc"
```

exposes an issue in the solver where the "requirement weight" is
computed incorrectly.

It makes up the following statement:

```
attr("direct_dependency",node(0,"tmux"),node_requirement("virtual_on_incoming_edges","gcc","cxx"))
```

even though `tmux` does not depend on `cxx`.

This leads to `condition_holds` for `%cxx=gcc`, even though this virtual
does not end as a dependency of `tmux` in the solution.

Signed-off-by: Harmen Stoppels <[email protected]>
alecbcs pushed a commit that referenced this pull request Aug 12, 2025
The following config

```yaml
packages:
  all:
    prefer:
    - "%c=gcc"
    - "%cxx=gcc"
    - "%fortran=gcc"
```

exposes an issue in the solver where the "requirement weight" is
computed incorrectly.

It makes up the following statement:

```
attr("direct_dependency",node(0,"tmux"),node_requirement("virtual_on_incoming_edges","gcc","cxx"))
```

even though `tmux` does not depend on `cxx`.

This leads to `condition_holds` for `%cxx=gcc`, even though this virtual
does not end as a dependency of `tmux` in the solution.

Signed-off-by: Harmen Stoppels <[email protected]>
alstar555 pushed a commit to alstar555/spack that referenced this pull request Aug 27, 2025
The following config

```yaml
packages:
  all:
    prefer:
    - "%c=gcc"
    - "%cxx=gcc"
    - "%fortran=gcc"
```

exposes an issue in the solver where the "requirement weight" is
computed incorrectly.

It makes up the following statement:

```
attr("direct_dependency",node(0,"tmux"),node_requirement("virtual_on_incoming_edges","gcc","cxx"))
```

even though `tmux` does not depend on `cxx`.

This leads to `condition_holds` for `%cxx=gcc`, even though this virtual
does not end as a dependency of `tmux` in the solution.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Angelica Loshak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1.0.1 PRs to backport for v1.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specifying un-needed dependency turns on default-False variant

2 participants