Skip to content

Conversation

@recursion-ninja
Copy link
Collaborator

On my machine, ghc-9.10 is the default compiler. Hence my first attempt at build the project failed... but barely. I notice that the project could easily build with the newest version of GHC with very minor changes to disambiguate some calls to foldl'. This PR adds future-proofing compatibility with GHC 9.10.

@jorisdral jorisdral linked an issue Aug 1, 2024 that may be closed by this pull request
Copy link
Collaborator

@jorisdral jorisdral left a comment

Choose a reason for hiding this comment

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

First contribution! Nice. Some comments:

I'd expect that fewer allow-newer stanzas are required if we consider more recent versions of packages on Hackage and CHaP (a Cardano-specific Hackage instance fyi). There are probably already a few releases that support ghc-9.10.1 among them.

diff --git a/cabal.project b/cabal.project
index cf07834..e265d56 100644
--- a/cabal.project
+++ b/cabal.project
@@ -12,11 +12,11 @@ repository cardano-haskell-packages
 
 index-state:
   -- Bump this if you need newer packages from Hackage
-  -- current date: crc32c-0.2.2
-  , hackage.haskell.org 2024-06-05T04:25:30Z
+  -- current date: support ghc-9.10.1
+  , hackage.haskell.org 2024-08-01T00:00:00Z
   -- Bump this if you need newer packages from CHaP
-  -- current date: fs-api-0.2.0.1, fs-sim-0.2.1.1
-  , cardano-haskell-packages 2023-11-30T09:59:24Z
+  -- current date: support ghc-9.10.1
+  , cardano-haskell-packages 2024-08-01T00:00:00Z
 
 packages: .

I'd also suggest this change to .github/workflows/haskell.yml to ensure our CI also builds/tests with ghc-9.10.1

diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml
index f7f1045..41d94fd 100644
--- a/.github/workflows/haskell.yml
+++ b/.github/workflows/haskell.yml
@@ -22,7 +22,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        ghc: ["9.2.8", "9.4.8", "9.6.4", "9.8.2"]
+        ghc: ["9.2.8", "9.4.8", "9.6.4", "9.8.2", "9.10.1"]
         cabal: ["3.10.2.1"]
         os: [ubuntu-latest, windows-latest, macOS-latest]
         cabal-flags: [""]
@@ -36,6 +36,10 @@ jobs:
             os: windows-latest
           - ghc: "9.8.2"
             os: macOS-latest
+          - ghc: "9.10.1"
+            os: windows-latest
+          - ghc: "9.10.1"
+            os: macOS-latest
         include:
           - ghc: "9.6.4"
             cabal: "3.10.2.1"

phadej
phadej previously requested changes Aug 1, 2024
Copy link
Collaborator

@phadej phadej left a comment

Choose a reason for hiding this comment

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

The comment applies to other occurrences of the import too

@recursion-ninja recursion-ninja force-pushed the ghc-9.10 branch 2 times, most recently from db6e3a7 to ffc1777 Compare August 2, 2024 19:07
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is required after changing the pinned dependency hash of fs-api and fs-sim as there was a name change of the function in the upstream API.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

An explicit import list was required to avoid a name clash with locally defined writeTMVar.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can probably just remove the local one. It was only there because writeTMVar was missing from io-classes

Copy link
Collaborator Author

@recursion-ninja recursion-ninja left a comment

Choose a reason for hiding this comment

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

I think the PR looks ready to merge into main.

Copy link
Collaborator

@jorisdral jorisdral left a comment

Choose a reason for hiding this comment

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

LGTM. Let's address the two new comments I inculded, and then we can merge

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can probably just remove the local one. It was only there because writeTMVar was missing from io-classes

@recursion-ninja recursion-ninja dismissed phadej’s stale review August 5, 2024 16:23

Comments addressed.

@recursion-ninja recursion-ninja force-pushed the ghc-9.10 branch 8 times, most recently from 93ac1ef to e0a238a Compare August 7, 2024 18:31
Copy link
Collaborator

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

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

LGTM. Make sure the "merge branch main" patch gets squashed into the main patch, before the PR is merged.

@recursion-ninja recursion-ninja force-pushed the ghc-9.10 branch 4 times, most recently from a027326 to b0fda3d Compare August 9, 2024 15:49
@mheinzel mheinzel added this pull request to the merge queue Aug 12, 2024
Merged via the queue into IntersectMBO:main with commit 639bfbf Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the library compatible with ghc-9.10

5 participants