Skip to content

Commit

Permalink
Merge pull request #108 from SamirTalwar/ghc-9.2.6
Browse files Browse the repository at this point in the history
Upgrade to GHC 9.2.6 by bumping the Stackage LTS and nixpkgs.
  • Loading branch information
SamirTalwar authored Mar 2, 2023
2 parents f00f533 + 513f41c commit 3a3c12d
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 39 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
tags:
- "v*"

env:
GHC_VERSION: "9.2.5"

jobs:
release:
name: Release
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
pull_request:
push:

env:
GHC_VERSION: "9.2.5"

jobs:
build-unix:
name: Build
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -144,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:
Expand Down
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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-"; "")' \
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" { };
Expand Down
2 changes: 1 addition & 1 deletion ghc.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.2.5
9.2.6
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-20.6
resolver: lts-20.12
packages:
- .
ghc-options:
Expand Down
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3a3c12d

Please sign in to comment.