-
Notifications
You must be signed in to change notification settings - Fork 701
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
Override version equality constraints #9511
Comments
Great! And we can finally close #7556, I assume. |
I'm the author of Updo. While Updo can work by taking resolvers straight from stackage, having to download a stackage resolver's |
Perhaps the scope of this enhancement should grow to have |
I think we should be able to address the problem of "overriding a package version while using a stackage snapshot" in a different way, and IMHO more principled. PS: I think this is basically how |
I think that it could work if Just off the top of my head, maybe rather than solving for the targets we could solve only for the targets dependencies? this would leave project local packages alone. 🤷 |
Few counterpoints:
|
The reason I think that having overridable constraints is important is because it does not just solve the problem of As soon as we have package imports and conditionals, we hit the issue -- we want to import something that sets a bunch of stuff, but we need to change it slightly. Either we clone it, or we allow overrides. Similarly, suppose we have a fixed project file, but then we want to override that with something specific that's likely to mutate more often than our project -- for example a companywide configuration banning certain package versions that are known bad. Then we need to allow our own settings to be overridden. And as noted in a linked ticket, this holds not just for constraints, not just for flags, but also for e.g. index-state, or perhaps settings that should exist only in CI configurations but nowhere else, etc. So making constraints and also all other settings overridable in a uniform way -- e.g. "last one wins" -- is a very straightforward approach to allowing all that. Note that "pick some packages and solve the rest" is a form of override by the way, just a very specifically constrained and ad-hoc one. |
If we were able to override version equality constraints then we would not have to download a stackage resolver's
cabal.config
file locally and comment out conflicting versions. This would work much the way stack allows its version overrides.Originally posted by @gbaz in #7556 (comment)
The text was updated successfully, but these errors were encountered: