Skip to content

Commit

Permalink
Merge pull request #136 from alanz/ghc-9.10
Browse files Browse the repository at this point in the history
GHC 9.10 support
  • Loading branch information
alanz authored May 16, 2024
2 parents b748dee + db76a86 commit 2893d08
Show file tree
Hide file tree
Showing 1,230 changed files with 4,527 additions and 4,671 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.17.20231219
# version: 0.19.20240514
#
# REGENDATA ("0.17.20231219",["github","ghc-exactprint.cabal","--ghcup-jobs"])
# REGENDATA ("0.19.20240514",["github","ghc-exactprint.cabal","--ghcup-jobs"])
#
name: Haskell-CI
on:
Expand All @@ -23,14 +23,14 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.8.1
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
fail-fast: false
Expand All @@ -40,10 +40,16 @@ jobs:
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.22.0/x86_64-linux-ghcup-0.1.22.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml
# From https://discourse.haskell.org/t/ann-cabal-3-12-0-0-released/9504
"$HOME/.ghcup/bin/ghcup" --no-cache install cabal -u 'https://gitlab.haskell.org/haskell/cabal/-/jobs/1848320/artifacts/raw/out/cabal-install-3.11.0.0-x86_64-linux-alpine3_12.tar.xz' 3.12.0.0-prerelease || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/cabal-3.12.0.0-prerelease" --version || true
cabal --version || true
# "$HOME/.ghcup/bin/ghcup" install cabal 3.11.0.0.2024.4.19 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
# "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -61,7 +67,7 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.0.0-prerelease -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -118,7 +124,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -146,15 +152,15 @@ jobs:
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(ghc-exactprint)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(ghc-exactprint)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand Down Expand Up @@ -184,7 +190,7 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ packages
/failing-tests-for-ghc.txt
/failing-tests-for-ghc9.2.txt
/failures.txt
/tests/examples/ghc910-copied/
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2024-xx-xx v1.9.0.0
* Support GHC 9.10.1
2022-12-19 v1.8.0.0
* Support GHC 9.8.1
2022-12-19 v1.7.1.0
Expand Down
11 changes: 6 additions & 5 deletions NEW-GHC.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Change to the current GHC git repository (for the new version of GHC)

$ mkdir /tmp/ghc-tests
$ export DESTINATION=/tmp/ghc-tests
$ export PREVIOUS=ghc-9.6
$ export PREVIOUS=ghc-9.8

Sanity check

Expand All @@ -27,8 +27,8 @@ tests. Generally remove any `should_fail` directory.

In the ghc-exactprint directory

$ mkdir tests/examples/ghc98-copied
$ find /tmp/ghc-tests -iname "*.hs" | xargs cp --backup=numbered -t ./tests/examples/ghc98-copied/
$ mkdir tests/examples/ghc910-copied
$ find /tmp/ghc-tests -iname "*.hs" | xargs cp --backup=numbered -t ./tests/examples/ghc910-copied/

Note: there is a pathological file `parsing001.hs`, which should be deleted

Expand All @@ -40,13 +40,14 @@ extension.
You may need to do `apt-get install mmv` first.
See http://manpages.ubuntu.com/manpages/zesty/en/man1/mmv.1.html

$ cd tests/examples/ghc98-copied
$ cd tests/examples/ghc910-copied
$ mmv "*.hs.~*~" "#1.#2.hs"

### cleanup whitespace in the files

$ cd tests/examples/ghc96-copied
$ cd tests/examples/ghc910-copied
$ ../../../emacs-ws-cleanup.sh
$ rm *~ # get rid of emacs backup files


### capture the failures
Expand Down
4 changes: 3 additions & 1 deletion ROUNDTRIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ This will generate three additional executables
Not all whitespace gets cleaned up via the `prepare-hackage` script,
so do the rest by

(make sure you have `fromdos` utility installed, on debian by `apt-get install tofrodos`)

```
cd hackage-roundtrip-work/
../emacs-ws-cleanup.sh
Expand Down Expand Up @@ -77,7 +79,7 @@ Empty out the contents of ./roundtrip-config/knownfailures.txt

```
cabal exec roundtrip -- clean
cabal exec roundtrip -- ./hackage-roundtrip-work/* +RTS -N2
time cabal exec roundtrip -- ./hackage-roundtrip-work/* +RTS -N2
cabal exec roundtrip -- failures +RTS -N2
cabal exec static
```
Expand Down
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ packages: .
-- $ cp ${WhereThisGitHubRepoIsCloned}/patches/$PKGID.cabal ./*.cabal
-- $ cd ../..

allow-newer:
ghc-paths:Cabal
-- allow-newer:
-- ghc-paths:Cabal

package ghc-exactprint
test-show-details: direct
Expand Down
47 changes: 46 additions & 1 deletion configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,50 @@ rm -fr dist*
# 9.8.1

# cabal configure -fdev -froundtrip --enable-tests --with-compiler=ghc-9.8.1 --allow-newer
cabal configure -fdev -froundtrip --enable-tests --with-compiler=ghc-9.8.1
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=ghc-9.8.1
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=ghc-9.8.2

#--------------------------------------------------------------------
#- GHC 9.10 / HEAD

# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.11.20240314/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.11.20240314/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.11.20240325/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.11.20240327/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.11.20240329/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.11.20240402/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.11.20240405/bin/ghc --allow-newer

# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.11.20240405/bin/ghc
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.11.20240405/bin/ghc --allow-newer

# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.11.20240405/bin/ghc
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.11.20240412/bin/ghc
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.11.20240412/bin/ghc --allow-newer

#- GHC 9.10
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.10.0.20240414/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.10.0.20240414/bin/ghc --allow-newer

# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.10.0.20240414/bin/ghc --allow-newer

# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.10.0.20240421/bin/ghc --allow-newer
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.10.0.20240502/bin/ghc --allow-newer

# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.11.20240505/bin/ghc --allow-newer

# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.10.0.20240508/bin/ghc --allow-newer
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.10.0.20240509/bin/ghc --allow-newer

#--------------------------------------------------------------------
#- GHC 9.10.1

# roundtrip usage
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.10.1/bin/ghc --allow-newer

# Check final state
# cabal configure -fdev --enable-tests --with-compiler=ghc-9.10.1
# cabal configure -fdev --enable-tests --with-compiler=ghc-9.101 --allow-newer
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=ghc-9.10.1
cabal configure -froundtrip --enable-tests --with-compiler=ghc-9.10.1

Loading

0 comments on commit 2893d08

Please sign in to comment.