From b9649bb590031acbd0ccc1dcc8fc856ef8782dab Mon Sep 17 00:00:00 2001 From: Samir Talwar Date: Wed, 1 Mar 2023 23:35:19 +0100 Subject: [PATCH 1/3] Upgrade to GHC 9.2.6 by bumping the Stackage LTS and nixpkgs. --- .github/workflows/release.yaml | 2 +- .github/workflows/verify.yaml | 2 +- flake.lock | 18 +++++++++--------- flake.nix | 4 ---- ghc.version | 2 +- stack.yaml | 2 +- stack.yaml.lock | 8 ++++---- 7 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e908543..f22c82c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,7 +5,7 @@ on: - "v*" env: - GHC_VERSION: "9.2.5" + GHC_VERSION: "9.2.6" jobs: release: diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 4564ac9..f71061e 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -4,7 +4,7 @@ on: push: env: - GHC_VERSION: "9.2.5" + GHC_VERSION: "9.2.6" jobs: build-unix: diff --git a/flake.lock b/flake.lock index 0ff548b..ae18072 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "owner": "edolstra", "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "type": "github" }, "original": { @@ -18,11 +18,11 @@ }, "flake-utils": { "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", "type": "github" }, "original": { @@ -50,11 +50,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1673474156, - "narHash": "sha256-8SBVelPtzNWDqPMqaYGX9A9G+M9AVEqv7AYeWj/6/s0=", + "lastModified": 1677706469, + "narHash": "sha256-5oCNOAnnrRnRxbyrfTbXdEbCQVZJ7Dj1KOPPyVYRhJE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "94ba1055239297f21cdbb275027604d88722cd10", + "rev": "fd449a33c1209d2aabc1cd4819e384b21f520eef", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 8e7e045..cb33bc2 100644 --- a/flake.nix +++ b/flake.nix @@ -30,10 +30,6 @@ # haskell package set from the version of GHC specified by `./ghc.version` ${ghcName} = super.haskell.packages.${ghcName}.override { overrides = hself: hsuper: { - # This is due to a GHC 9.2.5 regression. - # see https://gitlab.haskell.org/ghc/ghc/-/issues/22425 - ListLike = super.haskell.lib.dontCheck hsuper.ListLike; - # Override tar with the patched version; see stack.yaml for details. # The tests don't work. tar = hsuper.callCabal2nixWithOptions "tar" haskellTar "--no-check" { }; diff --git a/ghc.version b/ghc.version index f9458b8..4d6442e 100644 --- a/ghc.version +++ b/ghc.version @@ -1 +1 @@ -9.2.5 +9.2.6 diff --git a/stack.yaml b/stack.yaml index f54894d..80b485c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-20.6 +resolver: lts-20.12 packages: - . ghc-options: diff --git a/stack.yaml.lock b/stack.yaml.lock index d884e7a..83be75e 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -17,7 +17,7 @@ packages: git: https://github.com/haskell/tar.git snapshots: - completed: - sha256: 4905c93319aa94aa53da8f41d614d7bacdbfe6c63a8c6132d32e6e62f24a9af4 - size: 649315 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/6.yaml - original: lts-20.6 + sha256: af5d667f6096e535b9c725a72cffe0f6c060e0568d9f9eeda04caee70d0d9d2d + size: 649133 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/12.yaml + original: lts-20.12 From d90cf4fcc0e146a8be3b7a75f8b18c120e3841b6 Mon Sep 17 00:00:00 2001 From: Samir Talwar Date: Wed, 1 Mar 2023 23:39:53 +0100 Subject: [PATCH 2/3] Keep the GHC version in one place. --- .github/workflows/release.yaml | 13 ++++++++----- .github/workflows/verify.yaml | 13 ++++++++----- Makefile | 9 +-------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f22c82c..58d9af5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,9 +4,6 @@ on: tags: - "v*" -env: - GHC_VERSION: "9.2.6" - jobs: release: name: Release @@ -38,11 +35,14 @@ jobs: steps: - name: Check out uses: actions/checkout@v3 + - name: Get GHC version + id: ghc-version + run: echo "ghc-version=$(cat ghc.version)" >> "$GITHUB_OUTPUT" - name: Set up Haskell id: haskell-setup uses: haskell/actions/setup@v2 with: - ghc-version: ${{ env.GHC_VERSION }} + ghc-version: ${{ steps.ghc-version.outputs.ghc-version }} enable-stack: true stack-no-global: true stack-setup-ghc: true @@ -94,11 +94,14 @@ jobs: with: path: C:\Users\runneradmin\AppData\Local\Programs\stack key: v1-windows-latest-stack-${{ hashFiles('stack.yaml') }} + - name: Get GHC version + id: ghc-version + run: echo "ghc-version=$(Get-Content ghc.version)" >> "$Env:GITHUB_OUTPUT" - name: Set up Haskell id: haskell-setup uses: haskell/actions/setup@v2 with: - ghc-version: ${{ env.GHC_VERSION }} + ghc-version: ${{ steps.ghc-version.outputs.ghc-version }} enable-stack: true stack-no-global: true stack-setup-ghc: true diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index f71061e..5671ab4 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -3,9 +3,6 @@ on: pull_request: push: -env: - GHC_VERSION: "9.2.6" - jobs: build-unix: name: Build @@ -19,11 +16,14 @@ jobs: steps: - name: Check out uses: actions/checkout@v3 + - name: Get GHC version + id: ghc-version + run: echo "ghc-version=$(cat ghc.version)" >> "$GITHUB_OUTPUT" - name: Set up Haskell id: haskell-setup uses: haskell/actions/setup@v2 with: - ghc-version: ${{ env.GHC_VERSION }} + ghc-version: ${{ steps.ghc-version.outputs.ghc-version }} enable-stack: true stack-no-global: true stack-setup-ghc: true @@ -95,11 +95,14 @@ jobs: with: path: C:\Users\runneradmin\AppData\Local\Programs\stack key: v1-windows-latest-stack-${{ hashFiles('stack.yaml') }} + - name: Get GHC version + id: ghc-version + run: echo "ghc-version=$(Get-Content ghc.version)" >> "$Env:GITHUB_OUTPUT" - name: Set up Haskell id: haskell-setup uses: haskell/actions/setup@v2 with: - ghc-version: ${{ env.GHC_VERSION }} + ghc-version: ${{ steps.ghc-version.outputs.ghc-version }} enable-stack: true stack-no-global: true stack-setup-ghc: true diff --git a/Makefile b/Makefile index 4047393..e5c7d1f 100644 --- a/Makefile +++ b/Makefile @@ -101,19 +101,12 @@ smoke.cabal: $(CONF) touch $@ .PHONY: update-resolver -update-resolver: update-resolver-in-stack.yaml update-ghc-version +update-resolver: update-resolver-in-stack.yaml ghc.version .PHONY: update-resolver-in-stack.yaml update-resolver-in-stack.yaml: sed -i -r "s/^(resolver:) .*/\1 $$(curl -fsSI 'https://www.stackage.org/lts' | grep '^location: ' | sed 's#^location: /##' | dos2unix)/" stack.yaml -.PHONY: update-ghc-version -update-ghc-version: ghc.version update-github-workflow-ghc-version - -.PHONY: update-github-workflow-ghc-version -update-github-workflow-ghc-version: - sed -i -r "s/^ GHC_VERSION: \".*\"$$/ GHC_VERSION: \"$$(cat ghc.version)\"/" .github/workflows/*.yaml - ghc.version: $(CONF) curl -fsSL "https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/$$(yq -r '.resolver | gsub("[-\\.]"; "/")' stack.yaml).yaml" \ | yq -r '.resolver.compiler | sub("^ghc-"; "")' \ From 513f41c5ece1858bfd557f102b3cad959d1d82e9 Mon Sep 17 00:00:00 2001 From: Samir Talwar Date: Thu, 2 Mar 2023 00:39:18 +0100 Subject: [PATCH 3/3] CI: Bump install-nix-action. --- .github/workflows/verify.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 5671ab4..9d11678 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -73,7 +73,7 @@ jobs: - name: Check out uses: actions/checkout@v3 - name: Install Nix - uses: cachix/install-nix-action@v18 + uses: cachix/install-nix-action@v20 - name: Set up the Nix cache uses: cachix/cachix-action@v12 with: @@ -147,7 +147,7 @@ jobs: - name: Check out uses: actions/checkout@v3 - name: Install Nix - uses: cachix/install-nix-action@v18 + uses: cachix/install-nix-action@v20 - name: Set up the Nix cache uses: cachix/cachix-action@v12 with: