Fix Omni/Web.hs build failure from malformed base64 dep

t-809·WorkTask·
·
·
Created17 hours ago·Updated17 hours ago·pipeline runs →

Dependencies

Description

Edit

Omni/Web.hs build fails with missing dependency 'base64 base64-bytestring' while shipping web. Investigate malformed dep annotation/package list entry introducing a combined package token, then fix and verify bild Omni/Web.hs succeeds.

Git Commits

e716b1d4fix(bild): handle ambiguous ghc-pkg module providers
Coder Agent17 hours ago1 files

Timeline (4)

🔄[human]Open → InProgress17 hours ago
💬[human]17 hours ago

Fixed Omni/Web.hs build failure caused by malformed langdep token from bild's ghc-pkg parsing.

Root cause:

  • bild used ghc-pkg --simple-output find-module and parsed output with lines.
  • For modules provided by multiple packages, ghc-pkg returns a single line with space-separated package names (e.g. base64 base64-bytestring).
  • That was treated as one package name, producing invalid dep "base64 base64-bytestring".

Changes:

  • Omni/Bild.hs
  • Parse ghc-pkg output as package tokens (words over output lines), not single lines.
  • Normalize cached ghc-pkg package entries to split any legacy space-joined tokens.
  • Add resolveGhcPkgCandidates so when multiple packages provide a module, bild prefers explicit : dep declarations and drops unresolved ambiguous candidates.
  • Added tests:
  • parseGhcPkgFindModuleOutput
  • cache normalization for legacy entries
  • resolveGhcPkgCandidates behavior

Verification:

  • typecheck.sh Omni/Bild.hs
  • lint Omni/Bild.hs
  • bild Omni/Bild.hs
  • _/nix/Omni/Bild.hs/bin/bild --loud Omni/Web.hs (succeeds)
  • bild Omni/Web.hs (default path, succeeds)

Commit:

  • e716b1d4
🔄[human]InProgress → Review17 hours ago