Safe Haskell | None |
---|---|
Language | GHC2021 |
Hix.Managed.Bump.Candidates
Synopsis
- isBump :: Version -> Maybe Version -> Bool
- candidatesBump :: BuildHandlers -> QueryDep -> M (Maybe (DepMutation Bump))
Documentation
isBump :: Version -> Maybe Version -> Bool Source #
We only want to report a bump if the new version actually changes the build.
candidatesBump :: BuildHandlers -> QueryDep -> M (Maybe (DepMutation Bump)) Source #
Decide whether the latest version of a dependency requires changes to the currently specified bound.
If no latest version can be found, we return Nothing
to indicate that the dep should be skipped.
Otherwise, the range field of the DepMutation
is determined:
If the specified dependency has no upper bound (e.g. because the user has only entered the package name and ran the
app to resolve the bounds), or if the latest version is outside of the existing bounds, then we add a new bound to
the managed state, so we extend the version range by setting the upper bound to the major prefix of the next-highest
major of the latest version and return NewBounds
.
Otherwise, we return OldBounds
.