-
Couldn't load subscription status.
- Fork 76
Description
Together with @andreasabel, at MuniHac we are thinking about various ways to automate package dependency bumps, and we found a problem not present in all those lock-file-based ecosystem, but in a constraint-solver ecosystem like ours.
Consider package netrc with a dependency on bytestring < 0.12 and also parsec. A “dumb” dependency bumper might notice that bytestring-0.12.0.0 has been released and create a PR that extends the upper bound to bytestring < 0.13 (or the equivalent using >^=). Now the CI (nicely provided by haskell-ci) runs, is green, and the developer merges the PR.
All good? No!
Because there is no version of parsec supporting bytestring-0.12.0.0, the cabal solver silently picked bytestring-0.11.x.y, and the change in the PR was not tested at all.
I wonder how we can change the CI setup provided by haskell-ci to avoid this, and ensure that such a PR, if green, can be merged with good conscience.
Is this problem analysis so far correct?
One approach would be the following:
haskell-cigenerates an “upper bound” matrix job.- It uses the latest supported GHC (because with older GHCs we may not expect to be able to use the latest version of all libraries).
- This job gathers the upper bound of all dependencies (e.g.
dep-pkg-1.2.3.4) - And builds with
--allow-newer=*:dep-pkg --constraint=dep-pkg>=1.2.3.4.
Ideally, the logic behind the last two steps can be delegated to cabal or put into a separate tool that can also be used locally.
We can also refine the version select to pick the smallest patch version of the largest minor version allowed by the bounds.
Would such functionality be welcome in haskell-ci?