-
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
Allow building cabal-3.6 with GHC 9.2 #8025
Conversation
Thanks for the PR. Why not use master? Did you compare these fixes to what we've just finished on master to make it work with GHC 9.2? |
There are some risks in using a dev (3.7) not released version. I guess ghc prefers a more stable one. |
AFAIK it is usually undesirable to bump a major version of a boot package within the same GHC series. Patch releases of GHC are to provide more stability, not new features. So it is safer and simpler to release Cabal-3.6.3.0 (no need for cabal-install release), covering just newer dependencies and #7852. |
Fair enough. So, did you compare your PR to master? Regarding releases, @emilypi is our release manager. |
I guess it's more or less the same, I just ran |
I'm afraid, there is no single commit, but a tangled mess from iteratively porting to 9.2, overhauling CI to work with 9.2, spotting errors, fixing the porting, etc. in https://github.com/haskell/cabal/pull/7952/commits One thing I can't find in your PR but I remember we did is removing allow-newer from project files so that the upper bounds are not side-stepped.
I'd be worried that using a version that's completely not tested (tests in 3.6 branch are not ported to GHC 9.2 and, understandably, don't run on 9.2) is an even greater risk. Especially that we have discovered some test failures specific to 9.2 (or 9.0?) and some of these are not even resolved yet. And porting the new CI harness to 3.6.3 may be hard without porting all the changed tests, some of which use new API or have changed expected results, etc. I'm not saying this is impossible, but it may be hard. |
Done,
I'm afraid I don't quite follow what exactly is not ported: |
Indeed @Bodigrim hit the nail on the head. In general we do not perform major upgrades of core libraries in minor GHC releases to avoid breaking users. Upgrading between GHC releases in the same major series should be a painless task. |
I have no idea what this does. There are many testsuites and to fully exercise Cabal library you also need cabal-install tests and various integration tests. Also, does |
However, given that branch 3.6 almost didn't change since 3.6.2 and that users of GHC 9.2.1 did not complain, I think it's fine to release 3.6.3 --- it won't break cabal-install 3.6.2, because the bounds on cabal-instal-3.6.2 deps will keep it from working on 9.2. As a minimum precaution, I'd check if the failed tests we discovered recently when porting to 9.2 (and 9.0) are likely to affect branch 3.6 and if there's anything that needs to be done about it. @jneira: do you remember the ticket where we list the loose ends after the 9.2. CI port? Do you remember if we had to fix the Cabal library code due to the test failures discovered when porting? Is it likely that any such fix would be needed? |
Well, |
I'm sorry for pushing on a short notice, but it would be really awesome to prepare |
The pr which added 9.2 support for building Cabal and cabal-install was #7952 and the relevant commit 1d98686. Then the 9.2.1 job was marked as experimental due to haddock related test errors in the cli (cabal-install) suite. It was recorded in the issue #7987 In that pr i dont see any change over Cabal the library, it already had Lines 377 to 405 in 0077a69
But we have to take in account the cabal-testsuite also does integration tests for Cabal the library. The 3.6 branch does not have a job testing 9.2.1 so either we should tested it locally (as @Bodigrim already has done i guess) or try to add the job at least for Linux (or both things). The validate.sh test targeting Cabal the library is |
If that's all, this doesn't sound critical. In the worst case, in order to generate some (backpack?) haddocks, GHC devs or GHC users will need some extra fixes or workarounds (e.g., use cabal-install compiled with GHC 8.10.7). Not a good reason to delay GHC 9.2.2.
I agree, local tests should be enough. As you can see above, @Bodigrim doesn't seem to have touched https://github.com/haskell/cabal/tree/master/cabal-testsuite, so there's still work to do. I think we should just mimic master branch CI and note down any CI runs that were not performed or not successful. Let's merge this PR and continue in #8026. |
Just in case i am adding a 9.2.1 job against 3.6 here: jneira#6
I suppose local tests has been done only in linux so there is some risk of unexpected bugs in windows/macos. I hope the risk is low enough to go forward |
Could you point me to a mention of that anywhere? E.g., has https://github.com/haskell/cabal/tree/master/cabal-testsuite been run by anybody? |
See #8025 (comment)
I am supposing @Bodigrim did Cabal specific local tests using 9.2.1 (no cabal-testsuite) and i guess only in linux (but not sure) |
Not sure why I couldn't get Cabal-v3.6.3.0 tag to bootstrap with ghc-9.2.2, but relaxing these two bounds helped me get a functional build of cabal-install: --- cabal-install/cabal-install.cabal.orig
+++ cabal-install/cabal-install.cabal
@@ -278,7 +278,7 @@ executable cabal
echo >= 0.1.3 && < 0.2,
edit-distance >= 0.2.2 && < 0.3,
filepath >= 1.4.0.0 && < 1.5,
- hashable >= 1.0 && < 1.4,
+ hashable >= 1.0 && < 1.5,
HTTP >= 4000.1.5 && < 4000.4,
mtl >= 2.0 && < 2.3,
network-uri >= 2.6.0.2 && < 2.7,
@@ -287,7 +287,7 @@ executable cabal
random >= 1.2 && < 1.3,
stm >= 2.0 && < 2.6,
tar >= 0.5.0.3 && < 0.6,
- time >= 1.5.0.1 && < 1.11,
+ time >= 1.5.0.1 && < 1.12,
transformers >= 0.4.2.0 && < 0.6,
zlib >= 0.5.3 && < 0.7,
hackage-security >= 0.6.0.1 && < 0.7,
|
@blackgnezdo this PR relaxed bounds for |
Otherwise GHC 9.2.2 cannot be bootstrapped by GHC 9.2.1.
@Mikolaj could we please have it merged and released soon as Cabal-3.6.3.0? Just a revision would not be enough, because GHC source tree refers to Cabal repo, not to Cabal package on Hackage.