Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow allow-newer in cabal.project package stanzas #7896

Open
bgamari opened this issue Jan 5, 2022 · 4 comments
Open

Allow allow-newer in cabal.project package stanzas #7896

bgamari opened this issue Jan 5, 2022 · 4 comments
Labels
can-workaround There is a (maybe partial) workaround for the issue or missing feature type: enhancement

Comments

@bgamari
Copy link
Contributor

bgamari commented Jan 5, 2022

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.

@angerman
Copy link
Collaborator

angerman commented Jan 5, 2022

Isn't this

allow-newer:
  pipes-zlib:ghc-prim

?

I think this works. We use it a lot. E.g. here https://github.com/input-output-hk/plutus-apps/pull/225/files#diff-b8ed06757045fac949c89f2139a862498ad2b6d1f82c61a31e7c91d6cf0eaa70L28

@jneira
Copy link
Member

jneira commented Jan 5, 2022

@bgamari
Copy link
Contributor Author

bgamari commented Jan 5, 2022

Indeed it is. I do think that my proposal is more intuitive but nevertheless it's nice to know that the same thing can be achieved today.

@gbaz gbaz added can-workaround There is a (maybe partial) workaround for the issue or missing feature type: enhancement labels Jan 5, 2022
@alt-romes
Copy link
Collaborator

I ran into this today. I expected package X\nallow-newer:base to work too, and found this while searching for the "right way". I agree with @bgamari that it would be more intuitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can-workaround There is a (maybe partial) workaround for the issue or missing feature type: enhancement
Projects
None yet
Development

No branches or pull requests

5 participants