Skip to content

Commit 708fa43

Browse files
Add a pre-processing step that purges ghcup.
The version of `ghc` that comes pre-installed on runner images appears to be missing documentation for core libraries. This makes it impossible to build Haddock documentation with working hyperlinks, as `haddock` is unable to find documentation for those libraries, producing the following error: ``` Warning: The documentation for the following packages are not installed. No links will be generated to these packages: base-4.17.0.0, ghc-bignum-1.3, ghc-prim-0.9.0 ``` As a workaround, we create a pre-processing step that calls `ghcup nuke` to remove this installation. This enables the `haskell/actions/setup@v2` action to install `ghc` from scratch, together with the documentation for core libraries. Of course, this comes at a cost of slightly longer CI times, as we can no longer take advantage of a pre-installed `ghc`. However, it does make it possible to build working Haddock documentation.
1 parent b20ccc5 commit 708fa43

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@ jobs:
3535
- name: Checkout
3636
uses: actions/checkout@v3
3737

38-
- name: Environment
38+
- name: Environment (Purge)
39+
# The version of `ghc` that comes pre-installed on runner images does
40+
# not have documentation for core libraries. This makes it impossible
41+
# to build documentation with working hyperlinks to those libraries. To
42+
# solve this problem, we purge the existing installation, which enables
43+
# the next build step to install ghc from scratch, with documentation.
44+
run: ghcup nuke || true
45+
46+
- name: Environment (Installation)
3947
uses: haskell/actions/setup@v2
4048
id: setup-haskell-cabal
4149
with:

0 commit comments

Comments
 (0)