fix: subverso breakage from lean4#14834 - #39
Open
Kha wants to merge 1 commit into
Open
Conversation
`InternalTests`' highlighting harnesses ran the highlighter in this test module's own environment rather than in the one that processing the snippet ended in. Since lean4#14834 a `structure`/`class` field declaration carries term info for its projection, recorded while the structure is still being elaborated, so neither the occurrence's `ContextInfo` nor the ambient environment knew `S.x`, and looking up its signature threw `Unknown constant`. Highlight in the environment the snippet produced, the way `subverso-extract-mod` highlights a module in the environment its elaboration ended in. subverso is new to the monorepo (`downstream: add repo subverso`) and pins v4.29.0-rc7 upstream, so this only surfaced here; upstream tracks the same failure in leanprover/subverso#205.
Contributor
Build report for fix: subverso breakage from lean4#14834Turned green:
Stayed red
Stayed green
|
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.
masterwent red onnightly-2026-09-03whensubversowas added to the monorepo(run 33771303779):
subversofailed to build, andverso,verso-web-components,verso-slidesand thecritical
reference-manualwere all skipped behind it.subverso— fixedInternalTestsfailed withUnknown constant Foo.bar/S.x/C.f. Since lean4#14834 astructure/classfield declaration carries term info for its projection, recorded while thestructure is still being elaborated. The highlighter falls back to the ambient environment for
constants that an occurrence's
ContextInfodoes not know yet, and inInternalTeststhatfallback was this test module's own environment, which knows nothing the snippet declared — so
neither environment had the projection and looking up its signature threw. The three
highlighting harnesses now run in the environment that processing the snippet produced, the way
subverso-extract-modhighlights a module in the environment its elaboration ended in.subverso pins
v4.29.0-rc7upstream, so this only surfaces here; upstream tracks the samefailure in leanprover/subverso#205.
Verified:
lake buildclean from an empty.lake(56 jobs). subverso defines no test orlint driver, so that is its full phase set.
verso,verso-web-components,verso-slides,reference-manual— not fixed, blocked on the dependency fixupNone of them needs a source adaptation for this nightly, but they cannot build in the monorepo
as it currently stands, so this PR alone will not make the run green.
downstream: fixup repo verso(e4d5605) addedsubversoto the.lake/package-overrides.jsonof verso's nested test projects
test-projects/{anchor-examples,documented-package,website-examples,website-literate}.Those four pin
leanprover/lean4:v4.31.0in their ownlean-toolchain, so verso's build nowruns
elan run --install leanprover/lean4:v4.31.0 lake buildover the in-tree subverso andrewrites
subverso/.lake/buildwith v4.31.0.oleans. Every verso module that imports subversothen fails with
and where the nightly outputs are still read-only the nested build fails first with a bogus
permission denied (error code: 13)on one of them.Reproduced in isolation: after a clean nightly build of subverso, running
elan run --install leanprover/lean4:v4.31.0 lake build :examplesinverso/test-projects/website-examplesreplaced 18 of subverso's 25.oleans with v4.31.0 ones.Updater.fixup_subrepo_toolchainalready skips nestedlean-toolchainfiles whose contentsdiffer from the subrepo's;
fixup_subrepo_dependenciesappliesfixup_manifest_dependenciestoevery
**/lake-manifest.jsonwith no such check, so it needs the same guard. That is a.downstream/change and is therefore left out of this PR.With those four override entries emptied locally, everything behind subverso is clean on this
nightly:
versoverso-web-componentsreference-manualverso-slides--no-playwright, as in CI)so once the dependency fixup is corrected, the
subversocommit here should be all thatmasterneeds.🤖 Generated with Claude Code