Fix issue with haddock generation in CI#1169
Conversation
There was a problem hiding this comment.
Pull request overview
Work around a GHC 9.12.2 Haddock panic in the GitHub Pages docs workflow by switching Haddock generation to a GHC 9.14 dev shell.
Changes:
- Add a
haddockCompiler = "ghc914"flake variable and include it in the Linux compiler variants. - Update the GitHub Pages workflow to enter
nix develop .#ghc914(viause-nix-shell-action) before building Haddocks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
flake.nix |
Introduces a GHC 9.14 compiler variant intended for Haddock generation and includes it in the variants set. |
.github/workflows/github-page.yml |
Switches the docs workflow to use the .#ghc914 dev shell. |
|
|
||
| - uses: rrbutani/use-nix-shell-action@v1 | ||
| with: | ||
| devShell: .#ghc914 |
There was a problem hiding this comment.
| devShell: .#ghc914 | |
| devShell: .#haddock |
Could we use haddock name for the haddock shell? It'll be a tad more maintainable in case ghc version changes.
There was a problem hiding this comment.
You have a point in that, if you change the ghc version for that shell, then the pages ci action is going to break silently. But I don't think changing the name to haddock is a good idea because it kind of suggests the dev shell includes the haddock, which it doesn't.
More arguments against the suggested change:
- It follows the pattern of the existing "stable" shell, which is called ".#ghc967"
- It doesn't have to be exclusive to haddock generation, it is a normal
ghc914shell that could be used for anything really. - The comment close to where it is defined makes it already explains it is used for haddock generation.
I was initially considering naming the variable something like latest or unstable instead of haddock, but I was afraid that wasn't accurate enough.
Changelog
Context
The GitHub Pages haddock generation workflow is currently broken due to a GHC 9.12.2 panic:
This PR works around the issue by:
haddockCompiler = "ghc914"variable inflake.nixand including it in the flake variants so that a.#ghc914dev shell is available onx86_64-linux..github/workflows/github-page.ymlto use the.#ghc914dev shell instead of the default (GHC 9.12.2) shell.How to trust this PR
devShell: .#ghc914to theuse-nix-shell-actionstep.Checklist