Repository navigation
fix(tri): m2l scratch Lake package pins Trinity's lean-toolchain (#5982) - #6364
Merged
Merged
Conversation
…#5982) The temp package the measured-to-lean standalone lake check writes had no lean-toolchain file, so elan resolved the newest Lean (v4.34.1) instead of the v4.31.0 that proofs/lean4 pins, and `require trinity` built against a toolchain mathlib was never built for. Copy proofs/lean4/lean-toolchain into the package next to lakefile.lean (read from the file, not restated). New test m2l_package_pins_trinitys_lean_toolchain drives the check with `cmp lean-toolchain <pin>` as the build step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
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.
Refs #5982 (follows #5990).
Defect
m2l_standalone_lake_checkincli/tri/src/fpga.rswrites a temp Lake package (lakefile.lean+TrinityStandalone.lean) that doesrequire trinity from "<repo>/proofs/lean4", but it wrote nolean-toolchain. elan therefore resolved the newest Lean (v4.34.1) instead of Trinity's pin, and the package built Trinity and mathlib against a toolchain they are not pinned to: the likely cause of thelake buildfailure.Fix
proofs/lean4/lean-toolchain(currentlyleanprover/lean4:v4.31.0). The version is read from that file, never restated in code; a missing pin fails the check loudly.m2l_trinity_pkg()shared by the check and the new test.Test
m2l_package_pins_trinitys_lean_toolchainruns the whole check withcmp lean-toolchain <proofs/lean4/lean-toolchain>as the build step (the build program is already a parameter since #5990). It passes only if the scratch package'slean-toolchainexists and equals the repo pin. Negative control by reasoning: drop the copy andcmpexits 2 on the missing file, so the check panics on its build assertion. The existing scratch-cleanup probes still assert that nothing is left behind.Not run locally (the Mac is starved; no cargo there). CI on this PR is the proof.
rustfmt --checkon the file is clean; the NOW entry passestools/check_now_entry_shape.py.🤖 Generated with Claude Code