You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bump lower bound on base (because Cabal-syntax doesn't compile with GHC 7.10.3 and other old GHCs due to a bug) #8371
It seems that Cabal-syntax doesn't compile with GHC 7.10.3 and other old GHCs (complains about unknown flags or extensions; seen on hackage-security CI). If so, we should bump the bound on base accordingly so that people don't need to add hacky conditions to the same effect to their package, e.g., see haskell/hackage-security@737ad61
I think it's fine if we bump to the same range that we have in CI. It may make sense to revise the bound on Hackage for 3.8.1.0, too.
I don't think you need to bump the lower bound on base. You can just update the conditional ghc-options that is already in Cabal's cabal file to check also the lower bound:
But I am confused. Mikolaj@0dc215e still says 8.2. Am I missing something? Or do you mean that, for now, you'll just set it to the latest version that you support (8.2)? (That'd be fine.)
It seems I can't revise #8373 on Hackage: "Cannot change the 'if' condition expressions". So the change will become active only when a new version is released. I guess base version bumps would work, but let's try to stick to the more subtle version, unless there's a widespread breakage.
Shouldn't 3.8.1.0 get a revision with a lower base version bump anyway since we can't make more precise changes?
Perhaps. But so far we have one user against and zero users for this course of action. Are you aware of packages that would need that (except hackage-security that I've just hacked not to need it)? Actually, we could query Hackage and check...
From another angle. Assuming we'd bump base version only in 3.8.1.0, revert it (just not apply it on Hackage) in 3.8.2.0, what bad side-effects can happen? Is there any risk?
The bad effect is that packages that require old GHCs won't be able to use cabal 3.8.1.0, But they can't anyway, because while the build plan would succeed, the compilation would fail, right? Is there any scenario where the build plan goes through, but no compilation happens? Anything else that could go wrong with this one-time base bound bump?
At a practical level ("extensionally"), I think you are probably right.
At a deeper level, I think "The Right" (ahem) solution would be to publish a hotfix with what you just merged directly on top of the published 3.8.1 and deprecate the older version on hackage.
I'm not familiar with Cabal's development process to know how hard that would be. I don't know if hotfixes are even a thing in Cabal. (And thanks for looking into this quickly.)
Yes, indeed. But for the very practical reasons, I'd like to avoid the churn, both ours and of cabal users, given that the problem only affects >5 years old GHC users and the Hackage revision hack saves them the churn, as well, though it incurs the risk that whatever problem they already had or will have may get obscured (repo has different bounds than Hackage, etc.). Actually, anybody's problems get slightly obscured by Hackage revisions. But that's an old discussion. A trade-off.
I don't see any there. There's a new release, and a deprecated release. I suspect users will not be largely affected, expect perhaps those creating packages for distros and such.
it incurs the risk that whatever problem they already had or will have may get obscured (repo has different bounds than Hackage, etc.)
I think this is what I'm getting at with "at a deeper level". We even disable curation by hackage maintainers because, even if very well intended, it creates potential QA, verification (and in our case legal) issues to publish packages on hackage that don't match our releases on github. (This was a "policy" I instilled in our group at NASA, for example, and our internal requirements include it.)
The current plan, for which I'm seeking more comments and objections, is to bump lower base bound exclusively in the Cabal-syntax package, because this suffices to fix compilation breakage in hackage-security and in the old version of hackage-repo-tool that is currently on Hackage, so it's likely it fixes all or most breakages in the wild.
No further objections, so I'm giving it a few more hours and I'm going to carry out the plan. I can then check how it affects hackage-repo-tool, before I actually publish new hackage-repo-tool that fixes this from another end. Thank you for all the input here and elsewhere.
Reacted by ffaf1, Ivan Perez, PhD and Francesco Gazzetta
changed the title [-]Bump lower bound on base[/-][+]Bump lower bound on base (because Cabal-syntax doesn't compile with GHC 7.10.3 and other old GHCs due to a bug)[/+]on Aug 15, 2022
Actually, hackage-repo-tool was too outdated, with too restricted base bounds on its own, so it didn't start compiling again until I uploaded a new version to Hackage and now hackage-repo-tool builds again in our CI, e.g., see
Activity
Mikolaj commentedon Aug 12, 2022
Got the errors with 7.10.3:
in https://github.com/haskell/hackage-security/runs/7814994152?check_suite_focus=true
ivanperez-keera commentedon Aug 13, 2022
Same errors: https://app.travis-ci.com/github/ivanperez-keera/dunai/jobs/579714292
I don't think you need to bump the lower bound on
base. You can just update the conditionalghc-optionsthat is already in Cabal's cabal file to check also the lower bound:https://github.com/haskell/cabal/blob/master/Cabal/Cabal.cabal#L58-L63
Merge branch 'develop-base-version' into develop. Close #295.
Fix compilation on old GHCs (fixes haskell#8371)
Mikolaj commentedon Aug 13, 2022
You are right, this is a safer fix. Please review the PR.
I intend to emergency-merge this and then revise on Hackage for both packages.
Fix compilation on old GHCs (fixes haskell#8371)
ivanperez-keera commentedon Aug 13, 2022
I just added some comments. In short: I think those flags were introduced in GHC 8.0, not GHC 8.2.
ivanperez-keera commentedon Aug 13, 2022
I added my comments to 719735d, but there seems to have been a new commit 0dc215e. The comments still apply.
Mikolaj commentedon Aug 13, 2022
Yes, fixed for you. Initially I've just set as bound the last GHC version that we support.
ivanperez-keera commentedon Aug 13, 2022
Oh thanks! :)
But I am confused. Mikolaj@0dc215e still says 8.2. Am I missing something? Or do you mean that, for now, you'll just set it to the latest version that you support (8.2)? (That'd be fine.)
EDIT: clarification
Mikolaj commentedon Aug 13, 2022
Please look at the PR. Individual detached commits are pure chaos.
ivanperez-keera commentedon Aug 13, 2022
Thanks. Now I see it.
Merge pull request #8373 from Mikolaj/fix-compilation-on-old-GHCs
1 remaining item
Mikolaj commentedon Aug 13, 2022
It will take some more time to revise on Hackage. Will report here.
Mikolaj commentedon Aug 13, 2022
It seems I can't revise #8373 on Hackage: "Cannot change the 'if' condition expressions". So the change will become active only when a new version is released. I guess base version bumps would work, but let's try to stick to the more subtle version, unless there's a widespread breakage.
fgaz commentedon Aug 13, 2022
Shouldn't 3.8.1.0 get a revision with a lower base version bump anyway since we can't make more precise changes?
Mikolaj commentedon Aug 13, 2022
Perhaps. But so far we have one user against and zero users for this course of action. Are you aware of packages that would need that (except hackage-security that I've just hacked not to need it)? Actually, we could query Hackage and check...
Merge pull request #8374 from haskell/mergify/bp/3.8/pr-8373
Mikolaj commentedon Aug 13, 2022
From another angle. Assuming we'd bump base version only in 3.8.1.0, revert it (just not apply it on Hackage) in 3.8.2.0, what bad side-effects can happen? Is there any risk?
The bad effect is that packages that require old GHCs won't be able to use cabal 3.8.1.0, But they can't anyway, because while the build plan would succeed, the compilation would fail, right? Is there any scenario where the build plan goes through, but no compilation happens? Anything else that could go wrong with this one-time base bound bump?
ivanperez-keera commentedon Aug 13, 2022
At a practical level ("extensionally"), I think you are probably right.
At a deeper level, I think "The Right" (ahem) solution would be to publish a hotfix with what you just merged directly on top of the published 3.8.1 and deprecate the older version on hackage.
I'm not familiar with Cabal's development process to know how hard that would be. I don't know if hotfixes are even a thing in Cabal. (And thanks for looking into this quickly.)
Mikolaj commentedon Aug 13, 2022
Yes, indeed. But for the very practical reasons, I'd like to avoid the churn, both ours and of cabal users, given that the problem only affects >5 years old GHC users and the Hackage revision hack saves them the churn, as well, though it incurs the risk that whatever problem they already had or will have may get obscured (repo has different bounds than Hackage, etc.). Actually, anybody's problems get slightly obscured by Hackage revisions. But that's an old discussion. A trade-off.
ivanperez-keera commentedon Aug 13, 2022
I definitely cannot weigh in on that.
I don't see any there. There's a new release, and a deprecated release. I suspect users will not be largely affected, expect perhaps those creating packages for distros and such.
I think this is what I'm getting at with "at a deeper level". We even disable curation by hackage maintainers because, even if very well intended, it creates potential QA, verification (and in our case legal) issues to publish packages on hackage that don't match our releases on github. (This was a "policy" I instilled in our group at NASA, for example, and our internal requirements include it.)
Mikolaj commentedon Aug 13, 2022
Thank you for you input @ivanperez-keera. Noted.
The current plan, for which I'm seeking more comments and objections, is to bump lower base bound exclusively in the Cabal-syntax package, because this suffices to fix compilation breakage in hackage-security and in the old version of hackage-repo-tool that is currently on Hackage, so it's likely it fixes all or most breakages in the wild.
Let's decide on Monday.
Mikolaj commentedon Aug 15, 2022
No further objections, so I'm giving it a few more hours and I'm going to carry out the plan. I can then check how it affects hackage-repo-tool, before I actually publish new hackage-repo-tool that fixes this from another end. Thank you for all the input here and elsewhere.
[-]Bump lower bound on base[/-][+]Bump lower bound on base (because Cabal-syntax doesn't compile with GHC 7.10.3 and other old GHCs due to a bug)[/+]Mikolaj commentedon Aug 15, 2022
Bumped the lower bound in https://hackage.haskell.org/package/Cabal-syntax-3.8.1.0/revisions to
which corresponds to GHC 8.0.
This is a one-time workaround, not checked into the repo and not to be repeated in any new minor nor major releases.
Mikolaj commentedon Aug 15, 2022
Actually, hackage-repo-tool was too outdated, with too restricted base bounds on its own, so it didn't start compiling again until I uploaded a new version to Hackage and now hackage-repo-tool builds again in our CI, e.g., see
https://github.com/haskell/cabal/runs/7835252632?check_suite_focus=true
However, I restarted hackage-security jobs for an older version of hackage-security at
https://github.com/haskell/hackage-security/runs/7835204211?check_suite_focus=true
and they now pass for GHC 7.10.3, whereas they failed before, so the workaround works.
This issue is now fixed for a new release and worked around for the current one so let's let it rest.