-
Notifications
You must be signed in to change notification settings - Fork 696
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
Implement --allow-older
#3466
Implement --allow-older
#3466
Conversation
Unfortunately, So I didn't rename the TODO:
|
Since this is targeted at Also seems to break Travis. |
@23Skidoo If it's ok to break the API in Cabal 1.26 I'll happily rename the type to something like and Travis fails because I didn't adapt the testsuite yet... |
I think it's fine to break the API in this case. It's unlikely that this will break any setup scripts. |
@23Skidoo do you have any preference for how to rename the current For reference, here's the affected types that would need renaming to become less specific to -- | Policy for relaxing upper bounds in dependencies. For example, given
-- 'build-depends: array >= 0.3 && < 0.5', are we allowed to relax the upper
-- bound and choose a version of 'array' that is greater or equal to 0.5? By
-- default the upper bounds are always strictly honored.
data AllowNewer =
-- | Default: honor the upper bounds in all dependencies, never choose
-- versions newer than allowed.
AllowNewerNone
-- | Ignore upper bounds in dependencies on the given packages.
| AllowNewerSome [AllowNewerDep]
-- | Ignore upper bounds in dependencies on all packages.
| AllowNewerAll
deriving (Eq, Read, Show, Generic)
-- | Dependencies can be relaxed either for all packages in the install plan, or
-- only for some packages.
data AllowNewerDep = AllowNewerDep PackageName
| AllowNewerDepScoped PackageName PackageName
deriving (Eq, Read, Show, Generic) |
@hvr I think that something like the following should work: data RelaxDeps = RelaxDepsNone | RelaxDepsSome [RelaxedDep] | RelaxDepsAll
data RelaxedDep = RelaxedDep PackageName
| RelaxedDepScoped PackageName PackageName
newtype AllowNewer = AllowNewer RelaxDeps
newtype AllowOlder = AllowOlder RelaxDeps |
Seems reasonable. |
This also adds a not yet used `AllowOlder` newtype This is a preparatory refactoring propsed in haskell#3466 for supporting `--allow-older`
This also adds a not yet used `AllowOlder` newtype This is a preparatory refactoring propsed in haskell#3466 for supporting `--allow-older`
This also adds a not yet used `AllowOlder` newtype This is a preparatory refactoring propsed in haskell#3466 for supporting `--allow-older`
This also adds a not yet used `AllowOlder` newtype This is a preparatory refactoring propsed in haskell#3466 for supporting `--allow-older`
This PR is marked "solver", but the way it's implemented, it does not seem to touch solver code at all. In principle, I'd prefer somewhat if both From what I can see, this PR looks useful and ok, but it touches a lot of modules I don't know very much about. |
This also adds a not yet used `AllowOlder` newtype This is a preparatory refactoring propsed in #3466 for supporting `--allow-older`
rebased against latest master |
One problem with that is that |
LGTM, I think that this can be merged once the TODO items are implemented. |
rebased one last time & added docs/changelog/tests... once travis passes I'm gonna merge this to get this PR out of my sight... :-) |
This implements the flag `--allow-older` which is the analogous to `--allow-newer` acting on lower bounds.
This implements the flag `--allow-older` which is the analogous to `--allow-newer` acting on lower bounds.
This provides the dual flag to
--allow-newer
for symmetry.The need for relaxing lower bounds was suggested by @mgsloan here.