haskell / haskell/cabal

Solver: Prefer flag and stanza goals that have only one choice

Open
#3,482 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.