Skip to content

Complete Cabal build with deterministic parallel compilation - #16

Closed
nanavati wants to merge 1 commit into
cabalize-basefrom
cabal-build-complete
Closed

nanavati wants to merge 1 commit into
cabalize-basefrom
cabal-build-complete

Conversation

@nanavati

@nanavati nanavati commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Superseded by #17, which contains both logical commits.

All eight Haskell tools and the three test runners now build through Cabal. Make installs those binaries and builds the native/runtime pieces serially; Cabal owns Haskell dependency scheduling and parallelism.

Generated sources live in each component's build directory. A local Warmup module loads dependency interfaces in a stable order before compilation, and GHC 9.14.1 or newer uses object determinism and a shared job semaphore. Older supported GHC versions build serially by default. Build-affecting environment aliases become tracked Cabal flags, and native source edits trigger the relevant native rebuilds.

CI adds a GHC 9.14.1 determinism check comparing clean builds with 1, 16, 64, 64, and 64 workers, followed by a source edit/revert cycle. It hashes objects, interfaces, libraries, all tools, and test runners. The existing version matrix remains serial below 9.14.1.

This is based on the head of B-Lang-org#1084 (f092cfe34ad9851d67b963aea4c4c61926999ea1). The complete change, including this commit and the compiler-library split, is reviewed in #17.

Validation on GHC 9.14.1 / Cabal 3.16.1.0:

  • Built all eight tools and all three test runners; completed Make installation and license generation.
  • Smoke, utility, and explicitly enabled VCD checks: 336 passes and two expected failures.
  • Verified generated-source isolation, native edit/revert rebuilds, and tracked version-policy flags.
  • Created a source archive and tested native builds and Cabal configuration outside Git.
  • Build determinism: all 1,028 products match across clean builds with 1, 16, 64, 64, and 64 workers. The edit/revert check passes, including each test runner's interfaces.

The reported Git revision is captured on component build. Cabal 3.16 can retain that stamp after a Git-only change until the component is rebuilt; INSTALL.md documents this limitation. The determinism check covers one checkout and toolchain, not reproducibility across paths or machines.

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.

1 participant