Skip to content

Fix issue with haddock generation in CI#1169

Merged
palas merged 1 commit into
masterfrom
fix-haddock-issue
Apr 2, 2026
Merged

Fix issue with haddock generation in CI#1169
palas merged 1 commit into
masterfrom
fix-haddock-issue

Conversation

@palas
Copy link
Copy Markdown
Contributor

@palas palas commented Apr 1, 2026

Changelog

- description: |
    Fixed haddock generation bug by using GHC 9.14
  type:
    - maintenance
  projects:
    - cardano-api

Context

The GitHub Pages haddock generation workflow is currently broken due to a GHC 9.12.2 panic:

panic! (the 'impossible' happened)
  GHC version 9.12.2:
	tyConStupidTheta

AllLedgerPeers

This PR works around the issue by:

  1. Adding a haddockCompiler = "ghc914" variable in flake.nix and including it in the flake variants so that a .#ghc914 dev shell is available on x86_64-linux.
  2. Updating .github/workflows/github-page.yml to use the .#ghc914 dev shell instead of the default (GHC 9.12.2) shell.

How to trust this PR

  • The flake change is minimal: a new variable and adding it to the existing variants list.
  • The GHA change just adds devShell: .#ghc914 to the use-nix-shell-action step.
  • I've triggered the workflow on this branch so you can see the result here.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Self-reviewed the diff

@palas palas requested review from Jimbo4350 and newhoggy as code owners April 1, 2026 02:11
Copilot AI review requested due to automatic review settings April 1, 2026 02:11
@palas palas requested review from a team and carbolymer as code owners April 1, 2026 02:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (via use-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.

Comment thread flake.nix
@palas palas self-assigned this Apr 1, 2026
@palas palas changed the title Use GHC 9.14 for haddock generation in CI Fix issue with haddock generation in CI Apr 1, 2026

- uses: rrbutani/use-nix-shell-action@v1
with:
devShell: .#ghc914
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ghc914 shell 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.

@palas palas added this pull request to the merge queue Apr 1, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 1, 2026
@palas palas added this pull request to the merge queue Apr 1, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 2, 2026
@palas palas added this pull request to the merge queue Apr 2, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 2, 2026
@palas palas added this pull request to the merge queue Apr 2, 2026
Merged via the queue into master with commit 6617099 Apr 2, 2026
41 checks passed
@palas palas deleted the fix-haddock-issue branch April 2, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants