feat(WP-0016/C2-C3): close build infrastructure workplan

C2: document actual GHC cache behavior (-fbyte-code, no .o files, .hi
caching via -fwrite-interface) and correct CLAUDE.md cache claim.
C3: create IHUB-WP-0017 error-fix loop workplan (ralph-compatible,
5 tasks E1-E5, runs inside devenv shell).
WP-0016 status → done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 23:36:06 +00:00
parent 469ed6c758
commit 34be62de04
3 changed files with 169 additions and 14 deletions

View File

@@ -79,11 +79,7 @@ scripts/compile-check --bg # same, background-friendly (no colour/title)
scripts/compile-check-core # Layer 1+2 only — verify clean base before touching Layer 3
```
**GHC object cache**: compiled `.o`/`.hi` files persist in `.devenv/` between restarts. After the first full build (2060 min on constrained hardware), subsequent single-module rebuilds take 530 seconds. Cache location:
```bash
find /home/tegwick/inter-hub -name "*.hi" 2>/dev/null | head -5
```
**GHC compilation mode**: IHP uses `-fbyte-code` — GHCi compiles modules to bytecode in memory, not to persistent `.o` files. The `-fwrite-interface` flag writes `.hi` type-info files alongside source modules; these survive session restarts and skip re-type-checking of unchanged modules. Each ghcid restart regenerates bytecode for the full module graph. Expect 2060 min on first build; restarts are somewhat faster due to `.hi` caching but not dramatically so. `.hi` files are written next to their source files (e.g. `Web/Controller/Sessions.hi`).
**Error-fix discipline**: fix bottom-up (Layer 1 → 4). Fix one module at a time; wait for ghcid to reload before moving on. See `workplans/IHUB-WP-0016-build-infrastructure-and-error-loop.md` for the full SOP.