Solver: Prefer flag and stanza goals that have only one choice
Open
cabal-install: solver
type: enhancement
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I discussed this with @kosmikus. If a flag or stanza has only one choice, e.g, the user has enabled tests, the solver should assign a value as soon as possible, so that it can discover new dependencies more quickly. The behavior would be similar to `--reorder-goals`, but less general. It would also avoid the slowdown in tree traversal that is caused by `--reorder-goals`. Another possibility is to also prefer package goals where the user has specified an exact version.
This change would handle the issue with stanza preferences discussed here: https://github.com/haskell/cabal/issues/3453#issuecomment-222580111
Contributor guide
Assessment
This issue has not been assessed yet.