fix: make cabal.project.stage1 hermetic (:none + pin happy/alex/hpc)#190
Open
angerman wants to merge 1 commit into
Open
fix: make cabal.project.stage1 hermetic (:none + pin happy/alex/hpc)#190angerman wants to merge 1 commit into
angerman wants to merge 1 commit into
Conversation
… pin happy/alex/hpc) stage1 was missing `active-repositories: :none` and a build-tool pin, while stage2 and stage3 both have them. So stage1's build-tools — happy/happy-lib/alex for the compiler's Parser.y / Lexer.x — floated to Hackage's newest instead of the vetted versions. This was latent until happy-2.1.7 was published: after that, stage1 resolved + built happy-lib-2.1.7, whose generated parser (`happyDoParse`) mismatches the pinned 2.1.5 happy template and fails to compile (genprimopcode, GHC-44432). It broke CI that had previously been green, with no source change — purely the upstream happy release. Fix: add `active-repositories: :none` and explicit alex-3.5.2.0 / happy-2.1.5 / happy-lib-2.1.5 / hpc-0.7.0.2 URLs (versions match stage2/stage3). hpc is a dep of ghc whose bootstrap-installed version wants the old directory, conflicting with the pinned directory-1.3.10.0, so it must be provided as source too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make
cabal.project.stage1hermeticstage1 was missing
active-repositories: :noneand an explicit build-tool pin,while stage2 and stage3 both have them. So stage1's build-tools —
happy/happy-lib/alex for the compiler's
Parser.y/Lexer.x— resolved fromHackage and floated to the newest version.
This was latent: it only broke once happy-2.1.7 was published upstream.
After that, stage1 resolved + built
happy-lib-2.1.7, whose generated parseruses
happyDoParse, which mismatches the pinned 2.1.5 happy template and failsto compile (
genprimopcode,GHC-44432: happyDoParse … lacks an accompanying binding). CI that had been green started failing across platforms with nosource change — purely the upstream happy release. It also leaks into the
wasm/JS cross stage3, where the build-stage
genprimopcodepicks up the samefloated happy.
Fix
Give stage1 the same hermeticity as stage2/stage3:
active-repositories: :nonealex-3.5.2.0/happy-2.1.5/happy-lib-2.1.5/hpc-0.7.0.2URLs (versions match the other stages).
hpcis a dependency ofghcwhosebootstrap-installed version wants the old
directory, conflicting with thepinned
directory-1.3.10.0, so it must be provided as source too.Validation
Verified on the modern-pin branch: with this change stage1's solver plans
happy-2.1.5 (not 2.1.7) and stage1 + stage2
genprimopcodebuild cleanly(
happyParse, noGHC-44432).