Skip to content

Solver backjumps too far when linked packages have different flag assignments #2834

Closed
@grayjay

Description

@grayjay

I wrote a test case that reproduces the problem: grayjay@14e9d32 The solver doesn't find a solution.

The type D.C.Dependency.Modular.Dependency.Var can represent a flag variable. When Var is used in a conflict set, the name of the flag is usually simplified to "flag" to simplify the logic dealing with dependencies between flags. However, when a flag choice causes a linked dependency to have an inconsistent flag value, the solver creates a conflict set containing non-simplified Vars. The mismatch in flag names prevents the solver from finding the flag variables in the conflict set during backjumping. It backtracks past those variables, skipping the other possible flag assignments.

I'm interested in working on this. Does it make sense to create a SimpleVar type that does not contain the flag name and is only used in conflict sets?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions