Skip to content

Bumps for GHC 9.6 #291

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

Merged
merged 8 commits into from
Feb 22, 2023
Merged

Bumps for GHC 9.6 #291

merged 8 commits into from
Feb 22, 2023

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Feb 19, 2023

  • Bump tested-with and Haskell CI to GHC 9.6.1 alpha, 9.4.4 and 9.2.6
  • bump base, unix, Cabal-syntax

TODO:

  • Also bump the other CI

CI uses Cabal-syntax 3.9.0.0: https://github.com/haskell/hackage-security/actions/runs/4214000092/jobs/7314153972#step:15:1024

@andreasabel
Copy link
Member Author

On GHC 9.6.0, Haskell CI fails in the "unconstrainted build" step because of a Cabal-syntax/Cabal misconfiguration:
https://github.com/haskell/hackage-security/actions/runs/4214000236/jobs/7314154574

src/Hackage/Security/TUF/Layout/Repo.hs:9:1: error:
    Ambiguous module name ‘Distribution.Package’:
      it was found in multiple packages:
      Cabal-3.2.1.0 Cabal-syntax-3.8.1.0
  |
9 | import Distribution.Package
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

The "unconstrained build" problem could fix itself once Cabal >= 3.9 is published. However, I am mystified how it arises.

Copy link
Member

@Mikolaj Mikolaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@Mikolaj
Copy link
Member

Mikolaj commented Feb 20, 2023

I forgot the details of the fiasco with "Ambiguous module name". Would putting the same bounds on Cabal in the place where Cabal-syntax is bound help? I see that's what we are doing in cabal-install.

@andreasabel
Copy link
Member Author

andreasabel commented Feb 20, 2023

I forgot the details of the fiasco with "Ambiguous module name". Would putting the same bounds on Cabal in the place where Cabal-syntax is bound help? I see that's what we are doing in cabal-install.

Not sure. Since hackage-security should only depend on Cabal-syntax for later versions of Cabal, we would not want to add Cabal to the build-depends in the Cabal-syntax case:

if flag(Cabal-syntax) && impl(ghc >= 8.2)
build-depends: Cabal-syntax >= 3.7 && < 3.10
else
build-depends: Cabal >= 1.14 && < 1.26
|| >= 2.0 && < 2.6
|| >= 3.0 && < 3.7,
Cabal-syntax < 3.7

The Cabal dependency must be pulled in by another dependency, otherwise I cannot explain the situation.

Note that Cabal-3.2.1.0 is usually not available for GHC 9.x, only on head.hackage: (FIXED:) https://gitlab.haskell.org/ghc/head.hackage/-/blob/823768eb1bd58c74820362c8e09d8981e0407dea/patches/Cabal-3.2.1.0.patch
This patch only shows the changes to the code, not to the dependencies of Cabal-3.2.1.0.

So maybe this is just a problem with head.hackage, and we can ignore it for now. This is my suggestion, unless you have more insights into the problem.

@Mikolaj
Copy link
Member

Mikolaj commented Feb 20, 2023

I think you mistakenly pasted the same link twice.

Otherwise, we get to run every twice, for the push and the PR update.
@andreasabel
Copy link
Member Author

I think you mistakenly pasted the same link twice.

Indeed, thanks. Fixed.

@Mikolaj
Copy link
Member

Mikolaj commented Feb 20, 2023

So maybe this is just a problem with head.hackage, and we can ignore it for now. This is my suggestion, unless you have more insights into the problem.

Makes sense. We can't get rid of head.hackage (without adding allow-newer), right?

@andreasabel
Copy link
Member Author

Makes sense. We can't get rid of head.hackage (without adding allow-newer), right?

Indeed not.

I published revisions for all packages that were on hackage: 3152391

2023-02-20T10:23:03Z AndreasAbel hackage-repo-tool-0.1.1.3-r2
2023-02-20T10:18:13Z AndreasAbel hackage-security-HTTP-0.1.1.1-r5
2023-02-20T10:15:30Z AndreasAbel hackage-security-0.6.2.3-r1

@andreasabel
Copy link
Member Author

andreasabel commented Feb 20, 2023

I noticed when I compared with #290 again that I missed a bump from Cabal<3.10 to <3.12 in hackage-security's testsuite. CI cannot catch this as it works with 3.9.0.0.

Added a new patch. This would then be revision 2. Shall I publish it?
We could also wait until 3.10 is out for sure, or does this defeat the purpose?

@Mikolaj
Copy link
Member

Mikolaj commented Feb 20, 2023

No hurry, I guess. This won't derail cabal's release, because it's only the test. I think these tests are not run in cabal CI either.

The unconstrained build produces failing build plans.
Not surprising, given:

    allow-newer: *:Cabal, *:Cabal-syntax, *:array, *:base, *:binary, *:bytestring, *:containers, *:deepseq, *:directory, *:exceptions, *:filepath, *:ghc, *:ghc-bignum, *:ghc-boot, *:ghc-boot-th, *:ghc-compact, *:ghc-heap, *:ghc-prim, *:ghci, *:haskeline, *:hpc, *:integer-gmp, *:libiserv, *:mtl, *:parsec, *:pretty, *:process, *:rts, *:stm, *:system-cxx-std-lib, *:template-haskell, *:terminfo, *:text, *:time, *:transformers, *:unix, *:xhtml,
@andreasabel
Copy link
Member Author

The "unconstrained build" problem could fix itself once Cabal >= 3.9 is published. However, I am mystified how it arises.

I think I understand it now. The "unconstraint build" head job has allow-newer for all GHC-shipped packages, which includes Cabal and Cabal-syntax. So, this is just an artefact; I turned the "unconstrained build" off now.

@andreasabel
Copy link
Member Author

Squash and merge?

@Mikolaj
Copy link
Member

Mikolaj commented Feb 21, 2023

Sounds good to me. Please do.

@andreasabel andreasabel self-assigned this Feb 22, 2023
@andreasabel andreasabel added re: dependencies Concerning bounds of dependencies (Haskell ecosystem) re: continuous integration CI issues labels Feb 22, 2023
@andreasabel andreasabel changed the title GHC 9.6 Bumps for GHC 9.6 Feb 22, 2023
@andreasabel andreasabel merged commit 482bc5a into master Feb 22, 2023
@andreasabel andreasabel deleted the ghc-9.6 branch February 22, 2023 18:23
@andreasabel
Copy link
Member Author

No hurry, I guess. This won't derail cabal's release, because it's only the test. I think these tests are not run in cabal CI either.

I did the revision anyway now so that the codebase here is in sync with hackage. (Otherwise, coming back here in the future I would be puzzled, not remembering the details...)

@Mikolaj
Copy link
Member

Mikolaj commented Feb 22, 2023

Agreed, Andreas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re: continuous integration CI issues re: dependencies Concerning bounds of dependencies (Haskell ecosystem)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants