Skip to content

Commit

Permalink
CI: Downgrade Cabal for GHC 8.10.7 (#2899)
Browse files Browse the repository at this point in the history
Cabal 3.14 silently ignores `haddock-options` in `cabal.project`. The
change is deliberate (though not warning about it probably is not). The
change is documented in some places:

https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.14.0.0.md
https://github.com/haskell/cabal/blob/master/release-notes/WIP-Cabal-3.12.x.0.md
haskell/cabal#9177

(Note that the deprecation message apparently never made it to the
release notes)

We should probably think about how to fix this in the future, but for
now rolling back to Cabal 3.12 will allow us to build the documentation
as we want to again. The mentioned `haddock-version-cpp` flag in the
linked cabal PR 9177 above  to get a CPP define for
`__HADDOCK_VERSION__` did not work at all for me.

PR #2201 was supposed to update our Haddock generation to 9.0.2 but
accidentally picked 8.10.7 for the uploads to Hackage, which also fixed
issue #2200. I'm careful about upgrading Haddock now as I've experienced
several times now that there were undocumented changes going from one
version to the next that broke some rendering, and carefully rereading
our complete Haddock to scan for such breakage is an impossible task.
One day we'll have to upgrade, when we drop GHC 8.10 from Clash.

(cherry picked from commit 9d94353)

# Conflicts:
#	.ci/docker/build-and-publish-docker-image.sh
#	.ci/gitlab/benchmark.yml
#	.ci/gitlab/common.yml
#	.github/workflows/ci.yml
  • Loading branch information
DigitalBrains1 authored and mergify[bot] committed Mar 6, 2025
1 parent 0829840 commit bb89f18
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .ci/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ RUN git clone https://github.com/verilator/verilator verilator \

FROM builder AS build-ghc

ARG ghcup_version="0.1.30.0"
ARG ghcup_version="0.1.40.0"

# Must be explicitly set
ARG ghc_version
Expand Down
12 changes: 12 additions & 0 deletions .ci/docker/build-and-publish-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@ elif [[ "$1" != "" ]]; then
echo "Unrecognized argument: $1" >&2
exit 1
fi
<<<<<<< HEAD

UBUNTU_VERSION=jammy-20240911.1
GHC_VERSIONS=("9.10.1" "9.8.4" "9.6.6" "9.4.8" "9.2.8" "9.0.2" "8.10.7" "8.8.4" "8.6.5")
CABAL_VERSION="3.14.1.0"
||||||| parent of 9d94353c (CI: Downgrade Cabal for GHC 8.10.7 (#2899))

UBUNTU_VERSION=jammy-20240808
GHC_VERSIONS=("9.10.1" "9.8.4" "9.6.6" "9.4.8" "9.2.8" "9.0.2" "8.10.7")
CABAL_VERSION="3.14.1.0"
=======
UBUNTU_VERSION=jammy-20250126
GHC_VERSIONS=("9.10.1" "9.8.4" "9.6.6" "9.4.8" "9.2.8" "9.0.2" "8.10.7")
CABAL_VERSIONS=("3.14.1.1" "3.14.1.1" "3.14.1.1" "3.14.1.1" "3.14.1.1" "3.14.1.1" "3.12.1.0")
>>>>>>> 9d94353c (CI: Downgrade Cabal for GHC 8.10.7 (#2899))

# We want to use docker buildkit so that our layers are built in parallel. This
# is ignored completely on versions of docker which don't support buildkit.
Expand All @@ -25,6 +36,7 @@ export DOCKER_BUILDKIT=1
for i in "${!GHC_VERSIONS[@]}"
do
GHC_VERSION="${GHC_VERSIONS[i]}"
CABAL_VERSION="${CABAL_VERSIONS[i]}"

docker build \
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \
Expand Down
6 changes: 6 additions & 0 deletions .ci/gitlab/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.benchmark:
<<<<<<< HEAD
image: ghcr.io/clash-lang/clash-ci:$GHC_VERSION-20250102
||||||| parent of 9d94353c (CI: Downgrade Cabal for GHC 8.10.7 (#2899))
image: ghcr.io/clash-lang/clash-ci:$GHC_VERSION-20250101
=======
image: ghcr.io/clash-lang/clash-ci:$GHC_VERSION-20250305
>>>>>>> 9d94353c (CI: Downgrade Cabal for GHC 8.10.7 (#2899))
stage: test
timeout: 2 hours
variables:
Expand Down
8 changes: 8 additions & 0 deletions .ci/gitlab/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ default:
timeout: 10 minutes
stage: build
variables:
<<<<<<< HEAD
||||||| parent of 9d94353c (CI: Downgrade Cabal for GHC 8.10.7 (#2899))
CLASH_DOCKER_TAG: 20250101
CACHE_BUST_TOKEN: 3
=======
CLASH_DOCKER_TAG: 20250305
CACHE_BUST_TOKEN: 3
>>>>>>> 9d94353c (CI: Downgrade Cabal for GHC 8.10.7 (#2899))
# Note that we copy+paste the image name into CACHE_FALLBACK_KEY. If we don't,
# $GHC_VERSION gets inserted at verbatim, instead of resolving to some ghc version.
CACHE_FALLBACK_KEY: $CI_JOB_NAME-master-ghcr.io/clash-lang/clash-ci:$GHC_VERSION-20250102-3-3-non_protected
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ jobs:

# Run steps inside the clash CI docker image
container:
<<<<<<< HEAD
image: ghcr.io/clash-lang/clash-ci:${{ matrix.ghc }}-20250102
||||||| parent of 9d94353c (CI: Downgrade Cabal for GHC 8.10.7 (#2899))
image: ghcr.io/clash-lang/clash-ci:${{ matrix.ghc }}-20250101
=======
image: ghcr.io/clash-lang/clash-ci:${{ matrix.ghc }}-20250305
>>>>>>> 9d94353c (CI: Downgrade Cabal for GHC 8.10.7 (#2899))

env:
THREADS: 2
Expand Down
2 changes: 0 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ haddock:
extends: .common-local
needs: []
stage: test
variables:
GHC_VERSION: 9.0.2
artifacts:
paths:
- hadocs/*/*
Expand Down

0 comments on commit bb89f18

Please sign in to comment.