Repository navigation
fix: batteries breakage from the upstream shake import minimization - #137
Merged
Merged
Conversation
`downstream: update repo batteries` merged batteries `main` into
`nightly-testing` and so brought in `chore: shake` (batteries#2005), a
repo-wide import minimization computed on the `v4.35.0-rc3` toolchain. It
narrowed `Batteries/Lean/Meta/DiscrTree.lean` to `public import
Lean.Meta.DiscrTree.Types`, which is correct on `main`, where
`Trie.mergePreservingDuplicates` matches the `node` constructor directly,
but not on `nightly-testing`, which carries the adaptation to lean4#14805
and its new `Trie.chain` constructor and therefore goes through
`Trie.asNode` / `Trie.mkNode`. Those live in `Lean.Meta.DiscrTree.Util`,
so the module failed with
Invalid field `asNode`: The environment does not contain
`Lean.Meta.DiscrTree.Trie.asNode`
Unknown constant `Lean.Meta.DiscrTree.Trie.mkNode`
Import `Lean.Meta.DiscrTree.Util` instead; it publicly imports `.Basic`
and hence `.Types`, so `Key`, `Trie` and `DiscrTree` stay in scope.
Verified with `lake build --wfail`, `lake test` and `lake lint`.
Co-Authored-By: Claude Opus 5 <[email protected]>
Contributor
Build report for fix: batteries breakage from the upstream
|
| Repo | Critical | Build | Test | Lint |
|---|---|---|---|---|
| aesop | ✅ | ✅ in 16s | ✅ in 5s | ⏭️ |
| batteries | ✅ | ✅ in 1s | ✅ in 4s | ✅ in 2s |
| mathlib4 | ✅ | ✅ in 18m 21s | ✅ in 48s | ✅ in 1m 31s |
| repl | ✅ in 0s | ✅ in 52s | ⏭️ |
Stayed red
| Repo | Critical | Build | Test | Lint |
|---|---|---|---|---|
| cslib | 🟥 in 31s | ⏭️ | ⏭️ |
Stayed green
| Repo | Critical | Build | Test | Lint |
|---|---|---|---|---|
| import-graph | ✅ | ✅ in 2s | ✅ in 4s | ⏭️ |
| lean4-cli | ✅ | ✅ in 0s | ✅ in 0s | ⏭️ |
| plausible | ✅ | ✅ in 0s | ✅ in 2s | ⏭️ |
| ProofWidgets4 | ✅ | ✅ in 1s | ✅ in 1s | ⏭️ |
| quote4 | ✅ | ✅ in 0s | ✅ in 1s | ⏭️ |
| reference-manual | ✅ | ✅ in 11s | ⏭️ | ⏭️ |
| BibtexQuery | ✅ in 1s | ⏭️ | ⏭️ | |
| comparator | ✅ in 2s | ⏭️ | ⏭️ | |
| doc-gen4 | ✅ in 1s | ⏭️ | ⏭️ | |
| illuminate | ✅ in 1s | ✅ in 10s | ⏭️ | |
| lean4-unicode-basic | ✅ in 0s | ⏭️ | ⏭️ | |
| lean4export | ✅ in 0s | ✅ in 7s | ⏭️ | |
| LeanSearchClient | ✅ in 0s | ✅ in 0s | ⏭️ | |
| leansqlite | ✅ in 3s | ✅ in 16s | ⏭️ | |
| nerodia | ✅ in 1s | ✅ in 21s | ⏭️ | |
| verso | ✅ in 15s | ✅ in 2m 54s | ⏭️ | |
| verso-slides | ✅ in 29s | ✅ in 8s | ⏭️ | |
| verso-web-components | ✅ in 24s | ⏭️ | ⏭️ |
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.
Split out of #134: this is its
batteriescommit on its own, unchanged (b3bd4b838), so it can land independently of thecslibhalf.masteris red in run 37404438445 onnightly-2026-10-05:batteriesfails to build, andaesop,mathlib4andcslibare skipped behind it.batteries —
Trie.asNodeis inLean.Meta.DiscrTree.Util, not.Typesdownstream: update repo batteriesmerged batteries'mainintonightly-testingand so brought inchore: shake(batteries#2005), a repo-wide import minimization computed on thev4.35.0-rc3toolchain. It replacedpublic import Lean.Meta.DiscrTreebypublic import Lean.Meta.DiscrTree.TypesinBatteries/Lean/Meta/DiscrTree.lean. That is correct onmain, whereTrie.mergePreservingDuplicatespattern-matches thenodeconstructor directly. It is not correct onnightly-testing, which carries the adaptation to lean4#14805's newTrie.chainconstructor and therefore goes throughTrie.asNode/Trie.mkNode— and those live inLean.Meta.DiscrTree.Util. The merge combinedmain's import line withnightly-testing's body, so the module fails withFixed by importing
Lean.Meta.DiscrTree.Util, which publicly imports.Basicand hence.Types, soKey,TrieandDiscrTreestay in scope.Not covered here
With
batteriesbuilding again, CI reachescslib, which then fails on the removal ofPMF.uniformOfFinset/PMF.uniformOfFintype(mathlib4#42909). That fix stays in #134, so this PR alone is not expected to turnmasterfully green.Verification
Not re-run for this split: the commit is byte-identical to the one in #134 and sits on the same
masterparent (7768fa695). There it was verified onnightly-2026-10-05withlake build --wfail,lake testandlake lintinbatteries.🤖 Generated with Claude Code
https://claude.ai/code/session_01XyR8dP17VkvXwNSrqLMRcq