-
Notifications
You must be signed in to change notification settings - Fork 71
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
Force testing the latest allowed versions #667
Comments
Ah, I guess this has some overlap with what I wrote in #610, which was deemed out of scope. I guess the question is no longer “should haskell-ci create PRs”, but “could haskell-ci be made so that such a PR is sensibly tested”. |
Also related, but somewhat dual: #653 |
When there is such tool or I don't see this as a priority as before making PRs myself (for version bounds) I do The tool should take deprecated versions into account. And also skip versions with |
✓
Right; for those who don’t want a Github Action that does that for them, I am experimenting with https://github.com/nomeata/haskell-bounds-bump-action, as a stop-gap until the typical CI setup is able to check dependency bump PRs. |
I have created such a tool, called
I used it in it's own repo like this:
I can publish static linux binaries via the github releases, like I do for It’s probably not mature enough to be included in |
Maybe. One suggestion: if there is an option to output a |
Sure, will do! |
(JFTR: done, and moved the tool to its own repo: https://github.com/nomeata/cabal-force-upper-bound) |
Another related issue I run with There the solver successfully picked the The same would apply for anything else which is not boot library, I think that these issues are similar enough, and it would be great if they can be solved by the same solution. E.g. testing against all major versions in range (e.g. That said, cabal-force-upper-bound could take a list of includes/excludes. E.g. excluding boot libraries (or just testing the latest Now it feels that specifying |
What you describe (the worry about CI not testing lower or middle versions) is what I am trying to address with https://github.com/nomeata/cabal-plan-bounds - works well together with constraint sets as part of your build matrix. (I wish it wasn't all so complicated.) Why do you say you need one GHC covering all major versions? Isn't it (reasonably) sufficient to check each supported major version on some GHC? |
Unfortunately not in general. I consider it to be a bad practice to have conditional (on GHC version, or anything else) public API, but sometimes it is. For example: transformers-0.6 has TL;DR, in perfect world you are right, but the world is not perfect, software has bugs and people make mistakes. |
Oh, indeed. By that reasoning, in general, one would have to check any combination of GHC and dependency version (in a way, GHC is just another dependency). So perfect is not attainable; the question is what works well for most packages. Maybe the assumption that dependencies are independent is usually ok. |
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 onbytestring < 0.12
and alsoparsec
. A “dumb” dependency bumper might notice thatbytestring-0.12.0.0
has been released and create a PR that extends the upper bound tobytestring < 0.13
(or the equivalent using>^=
). Now the CI (nicely provided byhaskell-ci
) runs, is green, and the developer merges the PR.All good? No!
Because there is no version of
parsec
supportingbytestring-0.12.0.0
, the cabal solver silently pickedbytestring-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-ci
generates an “upper bound” matrix job.dep-pkg-1.2.3.4
)--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?
The text was updated successfully, but these errors were encountered: