Home / Input Output / cardano-api
Apr 12, 11-12 AM (0)
Apr 13, 12-1 AM (0)
Apr 13, 1-2 AM (0)
Apr 13, 2-3 AM (0)
Apr 13, 3-4 AM (0)
Apr 13, 4-5 AM (0)
Apr 13, 5-6 AM (1)
Apr 13, 6-7 AM (0)
Apr 13, 7-8 AM (1)
Apr 13, 8-9 AM (0)
Apr 13, 9-10 AM (0)
Apr 13, 10-11 AM (0)
Apr 13, 11-12 PM (0)
Apr 13, 12-1 PM (2)
Apr 13, 1-2 PM (4)
Apr 13, 2-3 PM (0)
Apr 13, 3-4 PM (0)
Apr 13, 4-5 PM (0)
Apr 13, 5-6 PM (0)
Apr 13, 6-7 PM (0)
Apr 13, 7-8 PM (0)
Apr 13, 8-9 PM (1)
Apr 13, 9-10 PM (0)
Apr 13, 10-11 PM (0)
Apr 13, 11-12 AM (0)
Apr 14, 12-1 AM (0)
Apr 14, 1-2 AM (0)
Apr 14, 2-3 AM (0)
Apr 14, 3-4 AM (0)
Apr 14, 4-5 AM (0)
Apr 14, 5-6 AM (0)
Apr 14, 6-7 AM (0)
Apr 14, 7-8 AM (0)
Apr 14, 8-9 AM (0)
Apr 14, 9-10 AM (0)
Apr 14, 10-11 AM (0)
Apr 14, 11-12 PM (0)
Apr 14, 12-1 PM (0)
Apr 14, 1-2 PM (0)
Apr 14, 2-3 PM (0)
Apr 14, 3-4 PM (0)
Apr 14, 4-5 PM (0)
Apr 14, 5-6 PM (0)
Apr 14, 6-7 PM (0)
Apr 14, 7-8 PM (0)
Apr 14, 8-9 PM (0)
Apr 14, 9-10 PM (0)
Apr 14, 10-11 PM (0)
Apr 14, 11-12 AM (0)
Apr 15, 12-1 AM (0)
Apr 15, 1-2 AM (0)
Apr 15, 2-3 AM (0)
Apr 15, 3-4 AM (0)
Apr 15, 4-5 AM (0)
Apr 15, 5-6 AM (0)
Apr 15, 6-7 AM (0)
Apr 15, 7-8 AM (0)
Apr 15, 8-9 AM (0)
Apr 15, 9-10 AM (0)
Apr 15, 10-11 AM (0)
Apr 15, 11-12 PM (0)
Apr 15, 12-1 PM (0)
Apr 15, 1-2 PM (0)
Apr 15, 2-3 PM (0)
Apr 15, 3-4 PM (0)
Apr 15, 4-5 PM (0)
Apr 15, 5-6 PM (0)
Apr 15, 6-7 PM (1)
Apr 15, 7-8 PM (0)
Apr 15, 8-9 PM (0)
Apr 15, 9-10 PM (0)
Apr 15, 10-11 PM (0)
Apr 15, 11-12 AM (0)
Apr 16, 12-1 AM (0)
Apr 16, 1-2 AM (0)
Apr 16, 2-3 AM (0)
Apr 16, 3-4 AM (0)
Apr 16, 4-5 AM (0)
Apr 16, 5-6 AM (0)
Apr 16, 6-7 AM (0)
Apr 16, 7-8 AM (0)
Apr 16, 8-9 AM (0)
Apr 16, 9-10 AM (0)
Apr 16, 10-11 AM (0)
Apr 16, 11-12 PM (0)
Apr 16, 12-1 PM (0)
Apr 16, 1-2 PM (0)
Apr 16, 2-3 PM (0)
Apr 16, 3-4 PM (0)
Apr 16, 4-5 PM (0)
Apr 16, 5-6 PM (7)
Apr 16, 6-7 PM (0)
Apr 16, 7-8 PM (0)
Apr 16, 8-9 PM (0)
Apr 16, 9-10 PM (0)
Apr 16, 10-11 PM (0)
Apr 16, 11-12 AM (0)
Apr 17, 12-1 AM (0)
Apr 17, 1-2 AM (0)
Apr 17, 2-3 AM (0)
Apr 17, 3-4 AM (0)
Apr 17, 4-5 AM (0)
Apr 17, 5-6 AM (0)
Apr 17, 6-7 AM (0)
Apr 17, 7-8 AM (0)
Apr 17, 8-9 AM (0)
Apr 17, 9-10 AM (0)
Apr 17, 10-11 AM (0)
Apr 17, 11-12 PM (0)
Apr 17, 12-1 PM (8)
Apr 17, 1-2 PM (3)
Apr 17, 2-3 PM (1)
Apr 17, 3-4 PM (0)
Apr 17, 4-5 PM (0)
Apr 17, 5-6 PM (2)
Apr 17, 6-7 PM (0)
Apr 17, 7-8 PM (0)
Apr 17, 8-9 PM (0)
Apr 17, 9-10 PM (0)
Apr 17, 10-11 PM (0)
Apr 17, 11-12 AM (0)
Apr 18, 12-1 AM (0)
Apr 18, 1-2 AM (0)
Apr 18, 2-3 AM (0)
Apr 18, 3-4 AM (0)
Apr 18, 4-5 AM (0)
Apr 18, 5-6 AM (0)
Apr 18, 6-7 AM (0)
Apr 18, 7-8 AM (0)
Apr 18, 8-9 AM (0)
Apr 18, 9-10 AM (0)
Apr 18, 10-11 AM (0)
Apr 18, 11-12 PM (0)
Apr 18, 12-1 PM (0)
Apr 18, 1-2 PM (0)
Apr 18, 2-3 PM (0)
Apr 18, 3-4 PM (0)
Apr 18, 4-5 PM (0)
Apr 18, 5-6 PM (0)
Apr 18, 6-7 PM (0)
Apr 18, 7-8 PM (0)
Apr 18, 8-9 PM (0)
Apr 18, 9-10 PM (0)
Apr 18, 10-11 PM (0)
Apr 18, 11-12 AM (0)
Apr 19, 12-1 AM (0)
Apr 19, 1-2 AM (0)
Apr 19, 2-3 AM (0)
Apr 19, 3-4 AM (0)
Apr 19, 4-5 AM (0)
Apr 19, 5-6 AM (0)
Apr 19, 6-7 AM (0)
Apr 19, 7-8 AM (0)
Apr 19, 8-9 AM (0)
Apr 19, 9-10 AM (0)
Apr 19, 10-11 AM (0)
Apr 19, 11-12 PM (0)
Apr 19, 12-1 PM (0)
Apr 19, 1-2 PM (0)
Apr 19, 2-3 PM (0)
Apr 19, 3-4 PM (0)
Apr 19, 4-5 PM (0)
Apr 19, 5-6 PM (0)
Apr 19, 6-7 PM (0)
Apr 19, 7-8 PM (0)
Apr 19, 8-9 PM (0)
Apr 19, 9-10 PM (0)
Apr 19, 10-11 PM (0)
Apr 19, 11-12 AM (0)
31 commits this week Apr 13, 2026 - Apr 20, 2026
Stop linking non-CHaP packages; mark them unclickable
Cross-package hrefs to non-CHaP packages (base, bytestring, time, the
transformers stack, etc.) were being rewritten to Hackage URLs. In
practice:

  - Readers of cardano-api docs rarely click into bootlib internals.
  - Haddock's per-module URL structure (including src/ source views
    and '-<version>-inplace' suffixes from local rebuilds) doesn't
    line up cleanly with Hackage's rendering, so most of these URLs
    fail validation and become dead-link spans anyway.

The Hackage rewrites were therefore mostly producing 404s without
adding reader value. Treat non-CHaP just like unmapped CHaP: emit an
unclickable <span> with a tooltip, no outbound link. Track the count
in a separate NON_CHAP bucket so it's visible in the summary but does
not contribute to strict-mode failure (it's a policy choice, not a
gap).
Make dead-link report actionable and non-blocking by default
Flip the exit-code default so the docs deploy is no longer blocked by
upstream drift. The script still collects every dead link across all
phases and reports them at the end (no early-exit); only the final
exit code changes:

  - Default: exit 0 after printing the full diagnostic. Set
    FIX_HADDOCK_LINKS_STRICT=1 to fail the build instead.
  - github-page.yml runs post-push and never blocked merges, but
    exit 1 was skipping the Deploy step — default 0 keeps the site
    deploying while the diagnostic is still visible.

Make the per-URL diagnostic tell the reader what to fix:

  - Upstream Haskell module name (derived from the URL path by
    reversing Haddock's dot-to-dash encoding).
  - Symbols being linked (the <a> tag anchor text, collected before
    the <a>→<span> replacement runs).
  - Our own docs pages that reference the URL (maps 1:1 to our .hs
    source files).

In GitHub Actions, each dead link also emits a ::warning:: workflow
command so the failure surfaces as an annotation in the job summary
UI, not just in the log body.
Collapse fix-haddock-links phases from 8 to 3
The previous 8 phases narrated every internal step (filesystem scan,
CHaP fetch, HTML grep, probing, rewriting, validation, annotation, CSS
injection). Most were set-up substeps under three conceptual stages:

  Phase 1: Prepare      — filesystem scan, inplace symlinks, CHaP
                          fetch, single HTML grep that feeds both
                          target discovery and versioned-hash
                          symlinking.
  Phase 2: Resolve +
           rewrite      — probe each discovered package, build sed
                          args (rewrites and unmapped-CHaP
                          unclickables), apply in one sed pass.
  Phase 3: Validate +
           annotate     — HEAD-check all rewritten URLs, annotate dead
                          ones, inject CSS.

Also drops a redundant grep (the Phase 0(b)/Phase 3 HTML scans collapse
into one) and a redundant empty-dead-count check. Script is now 261
lines (from 328).
Simplify fix-haddock-links: probe fallback replaces override table
Config simplifications:
- Drop EXACT_OVERRIDES table (14 entries), SITE_PATH_SUFFIX table
  (2 entries), and the 4 named base-URL constants.
- Replace with one IOG_DOC_BASES list (6 entries) of known IOG
  doc-site roots, including path prefixes for non-flat sites.
- resolve_url now tries name-suffix candidates first, then falls
  back to probing each IOG_DOC_BASES entry. Verified against all 30
  packages cardano-api currently links to: all resolve correctly with
  no per-package bookkeeping.
- Adding a new IOG doc site is now one line; new packages on existing
  sites need no edit at all.

Structural simplifications:
- Merge Phase 5 (link rewrites) and Phase 5b (unmapped-CHaP
  unclickables) into a single sed pass — their rewrites are on
  disjoint package patterns.
- Consolidate three redundant trap calls into one upfront trap.
- Fix a latent bug: dead-link CSS was only injected when there were
  dead URLs, so a run with only unmapped-CHaP spans would leave them
  unstyled. CSS now runs whenever any spans were produced.
- Replace REWRITTEN_HACKAGE / REWRITTEN_DOCSITE arrays (used only for
  counts) with counters.
- Factor the <span class='dead-link'> sed expression into a small
  add_unclickable_sed helper shared by Phase 5 and Phase 7.
Fix broken cross-package Haddock links on hosted docs site
Fixes #601. Links to dependency packages (cardano-ledger-*, plutus-*,
etc.) were relative paths pointing to directories that don't exist on
the hosted site, resulting in 404s.

Adds scripts/fix-haddock-links.sh, invoked from the github-page
workflow, which:
- Fetches the CHaP package index to classify packages as CHaP vs Hackage
- Auto-discovers all broken cross-package links in generated HTML
- Creates symlinks for versioned directory names (GHC-bundled and local)
- Rewrites links to known doc sites (prefix rules + exact overrides) or
  Hackage
- Validates all rewritten URLs with HTTP HEAD requests
- Replaces dead links with annotated plain text (tooltip shows package
  name)

This eliminates any ad-hoc hardcoded list, automatically handles new
dependencies, and guarantees zero broken clickable links.
Rewrite fix-haddock-links.sh with auto-discovery and link validation
Replace the hardcoded package list approach with an automated system that:
- Fetches the CHaP package index to classify packages as CHaP vs Hackage
- Auto-discovers all broken cross-package links in generated HTML
- Creates symlinks for versioned directory names (GHC-bundled and local)
- Rewrites links to known doc sites (prefix rules + exact overrides) or Hackage
- Validates all rewritten URLs with HTTP HEAD requests
- Replaces dead links with annotated plain text (tooltip shows package name)

This eliminates the ad-hoc hardcoded list, automatically handles new
dependencies, and guarantees zero broken clickable links.