Allow allow-newer in cabal.project package stanzas
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
Currently `allow-newer` can be used to lift lower-bounds on a set of packages throughout the install plan. However, this is often a far larger hammer than is necessary. More often, I merely need to lift an outdated bound in a particular package. `cabal-install` should allow the user to express this intent in their `cabal.project` file with use of the `allow-newer` field in a `package` stanza. For instance, if package `pipes-zlib` has an outdated bound on `ghc-prim`, I could lift this bound using,
```
package pipes-zlib
allow-newer: ghc-prim
```
This would have the effect of dropping the upper bound from any constraints on `ghc-prim` from `pipes-zlib.cabal`.
Contributor guide
Research direction
Start by reading how cabal-install parses cabal.project package stanzas and how the existing allow-newer setting is applied. Trace the handling of constraints from a package stanza to the install plan, then add coverage for the pipes-zlib example. Done means package-scoped allow-newer lifts only the named dependency bound, without changing global behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100