haskell / haskell/cabal

Allow allow-newer in cabal.project package stanzas

Open
#7,896 4 comments 0 reactions 0 assignees View on GitHub
can-workaround type: enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.