Repository navigation
fix: verso breakage from the verso-web-components subverso bump - #142
Closed
downstream-lean4[bot] wants to merge 2 commits into
Closed
downstream-lean4[bot] wants to merge 2 commits into
downstream-lean4[bot] wants to merge 2 commits into
Conversation
`downstream: update repo verso-web-components` (8b98517) moved `verso-web-components`'s `subverso` pin from `d047cb48` to `892d6dc5`, which is past subverso#243 ("remove old examples mechanism"). `subverso` is not a subrepo, so each consumer resolves it from its own `lake-manifest.json` — and the in-tree `verso` (tracked on `nightly-testing`, which has not merged `main` since 2026-10-01) still used `SubVerso.Examples.loadExamples`, the `Example` type and `SubVerso.Examples.Env`. Hence `verso`'s own sources failed, but only when built from `verso-web-components`: `Unknown constant SubVerso.Examples.loadExamples` in `src/verso-blog/VersoBlog.lean`. Ports verso#1015, which did this adaptation on verso `main`: the blog genre's `leanExampleProject`/`leanCommand`/`leanTerm` now throw an error pointing at the anchor-based replacements, `ExampleMessages` loses the subproject summand, and `test-projects/website{,-examples}` plus the release note come over from upstream verbatim (those three files were identical to `nightly-testing`). The `html%{…}`/`Html.element` adaptations the monorepo carries on top of `nightly-testing` are kept. Verified: `verso-web-components` `lake build`; `verso` `lake build` + `lake test` (720 passed); `verso-slides` `lake build` + `lake test -- --no-playwright`.
Completes the port of verso#1015 in the parent commit. Upstream dropped
`{leanExampleProject ...}`, whose SubVerso `examples` facet used to build the
example project as a side effect, and compensated in verso's own CI with an
explicit `lake build` in `test-projects/website-examples`. The monorepo runs
only `lake build` in each subrepo, so nothing built `Examples.olean` any more
and `DemoSite.Blog.Subprojects` failed with
error finding highlighted code: unknown module prefix 'Examples'
Build the module in `loadModuleContent` before running `subverso-extract-mod`,
the way `Verso.Code.External` already does for anchor-based examples, so the
`leanExampleModule` path is self-contained.
Also takes verso#1015's remaining hunks: the `subverso` pins in verso's own
manifest and in the six nested test projects (upstream's exact revisions —
`b15c6a08` for the ones on the monorepo toolchain, `1f548ab5` for the four
pinned to v4.31.0).
Co-Authored-By: Claude Opus 5 <[email protected]>
Contributor
Author
Build report for fix: verso example-module loader must build the module it extractsTurned green:
Stayed red
Stayed green
|
Contributor
Author
|
Superseded by #145. |
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.
masteris red atverso-web-componentssince run 37511223048, which takes the criticalreference-manualwith it through the skip chain.verso
Root cause.
downstream: update repo verso-web-components(8b98517) moved that repo'ssubversopin fromd047cb48to892d6dc5, i.e. past subverso#243 ("remove old examples mechanism"), which deletedSubVerso.Examples.loadExamples, theExampletype andSubVerso.Examples.Env.subversois not a subrepo, so every consumer resolves it from its ownlake-manifest.json. The in-treeversois tracked onnightly-testing, which has not mergedmainsince 2026-10-01 and still used all three. Soverso's own sources failed, but only when built fromverso-web-components:Fix. Port verso#1015, which made this adaptation on verso
main:src/verso-blog/VersoBlog.lean— the blog genre'sleanExampleProjectandleanCommandcommands and itsleanTermrole now throw an error that names the anchor-based replacements and links to the migration instructions;LeanExampleDataloses itssubprojectconstructor,ExampleMessages.messagesloses theList (MessageSeverity × String)summand, andleanOutputcollapses to the single remaining case. Thehtml%{…}andHtml.elementadaptations the monorepo carries on top ofnightly-testingare preserved.src/verso-literate/VersoLiterateMain.lean— drop theSubVerso.Examples.Envimport, which no longer exists at the new pin.test-projects/website/DemoSite/Blog/Subprojects.lean,test-projects/website-examples/{Examples.lean,Examples/Basic.lean}and the release note taken from upstream verbatim: all three sources were byte-identical tonightly-testing, so there was nothing to merge.Second commit: the port was incomplete
The first commit's CI run (37522088747) traded one failure for another:
verso-web-componentswas fixed, butversoitself went red atDemoSite.Blog.Subprojects, andverso-slides,verso-web-componentsandreference-manualwere all skipped behind it.{leanExampleModule exampleMod …}runslake exe subverso-extract-mod Examplesin the nestedexample project, and that extractor only imports the module's
.olean— it does not build it.Until verso#1015 the preceding
{leanExampleProject examples …}had built it as a side effect, viaSubVerso's
examplesfacet (let modJob ← mod.olean.fetch). verso#1015 removed that command andcompensated in verso's own CI, which gained nothing here — it dropped a line:
The monorepo's
build.pyruns onlylake buildin each subrepo, so there is no such step andnothing built
Examples.oleanany more. Rather than reach forrepos.toml, build the module inloadModuleContentbefore running the extractor, exactly asVerso.Code.Externalalready does foranchor-based examples (
lake build subverso-extract-mod,lake build +<mod>:highlighted). Thatmakes the
leanExampleModulepath self-contained and is worth having upstream too.The second commit also takes verso#1015's remaining hunks, which the first one missed: the
subversopins in verso's own manifest and in the six nested test projects, at upstream's exactrevisions —
b15c6a08(subversomainat #243) for the three on the monorepo toolchain,1f548ab5(the matching auto-generated release commit) for the four pinned tov4.31.0. These areupstream's own generated values rather than hand-picked pins;
lake updatewas not an option forthe nested projects, which pin
v4.31.0and would get an incompatiblemainHEAD.Note that bumping verso's own
subversopin invalidates the artifact cache forversoandeverything downstream of it, so the next run rebuilds that subtree once.
Verified locally on
nightly-2026-10-06, withverso/test-projects/website-examples/.lake/buildremoved first — the first commit's local run passed only because that directory was still warm from
an earlier build, which is exactly what CI does not have:
versolake build(1267 jobs, incl.DemoSite.Blog.Subprojects),lake test(720 passed, 0 failed)verso-web-componentslake build(469 jobs) — the originally failing repo, build-onlyverso-slideslake build(749 jobs),lake test -- --no-playwrightreference-manuallake build(1577 jobs), with #140 applied on top — build-onlyThis will recur. David Thrane Christiansen noted on 2026-10-03 that verso
maincannot be merged intonightly-testinguntil a nightly ships the rewritten parser or verso's new parser tests are turned off, so the in-treeversowill keep lagging itsmain-tracked consumers and furthermainhunks will have to be ported the same way.Left unfinished
mathlib4(critical) and behind itrepl's test phase andcslib:grindthrows the internal errorunknown free variableonList.pairwise_iff_forall_infix, from lean4#15506. Nothing downstream can adapt to that; lean4#15524 fixes it upstream and lands with the next nightly. Already reported.reference-manual's own two stale expectation blocks are in fix: reference-manual breakage from nightly-2026-10-06 #140, still open — that is why it was applied locally above rather than here.So
masterdoes not go green on this nightly; this PR takesverso-web-componentsand thereference-manualskip out of the red set.