Skip to content

fix: ProofWidgets4 breakage from the mathlib4 nightly-testing revert - #158

Closed
downstream-lean4[bot] wants to merge 1 commit into
masterfrom
push-ynvqxwupmmmk
Closed

downstream-lean4[bot] wants to merge 1 commit into
masterfrom
push-ynvqxwupmmmk

Conversation

@downstream-lean4

Copy link
Copy Markdown
Contributor

master is red at mathlib4 since run 38276841000, with cslib skipped behind it. verso and the three repos skipped behind it are a separate, older failure, still covered by #145.

ProofWidgets4

Root cause. downstream: update repo mathlib4 (d29d62d) brought in mathlib4-nightly-testing@d274853, Anne Baanen's revert of the chore: downstream-lean4 adaptations for nightly-2026-10-07 export commit. That commit carried the mathlib4 half of #35, the adaptation for leanprover/lean4#15002: core owns HTML-like syntax now, the in-tree ProofWidgets4 grew a jsx%{…} elaborator on top of it (ProofWidgets/Data/Html/Elab.lean) and deprecated its own Jsx term syntax, and mathlib4's 13 widget files moved over.

The revert's own reason is the right one:

This is necessary as a temporary measure while ProofWidgets' nightly-testing doesn't have the downstream-lean4 changes.

Upstream ProofWidgets4's nightly-testing has neither ProofWidgets/Data/Html/Elab.lean (404) nor the deprecation — those hunks of #35 live only in the monorepo, and ProofWidgets4 has no export job, so they have never reached it. mathlib4-nightly-testing therefore has to keep using the old syntax to build upstream at all.

Downstream that leaves mathlib4 using a syntax the in-tree ProofWidgets4 deprecates, and with --wfail the warnings are the whole failure — 52 sites, no ✖ anywhere:

warning: Mathlib/Tactic/Widget/SelectPanelUtils.lean:96:15: syntax 'ProofWidgets.Jsx.term_' has been deprecated: use a jsx%{…} literal instead

Fix. Comment out the deprecated_syntax line until ProofWidgets' nightly-testing carries the elaborator. jsx%{…} stays available, and everything already migrated to it — the elaborator itself, ProofWidgets.Demos, verso — is untouched. The monorepo just stops requiring a migration that one of its consumers cannot make.

Why not re-apply the migration to mathlib4 instead. Its export job in build-post-export.yml runs with pr: false, i.e. export-pr-create pushes the export commit directly onto mathlib4-nightly-testing. The next green master would push the 13 files straight back and undo the revert within the hour. Keeping mathlib4 byte-identical to upstream also means the export finds nothing interesting to push at all.

What needs a person. Get #35's ProofWidgets4 hunks onto ProofWidgets' nightly-testing — by hand, or by wiring up a ProofWidgets4 export job next to the batteries, mathlib4 and cslib ones. Then upstream mathlib can take the migration back and this line can be restored; until then every downstream: update repo mathlib4 that touches a widget file will keep reverting it.

Verified

All on nightly-2026-10-12, with CI's own options, on top of master at d29d62d:

repo phases
ProofWidgets4 lake build ProofWidgets ProofWidgets.Demos --wfail (101 jobs), lake test --wfail (29 jobs); no lint driver
mathlib4 lake build Mathlib Archive Counterexamples Wanted cache --wfail (18410 jobs), lake test --iofail (18932 jobs), lake lint
cslib lake build --wfail --iofail (6674 jobs), lake test --wfail --iofail (18681 jobs, full Mathlib), lake lint

mathlib4 was a genuine full recompile, not a cache replay: changing ProofWidgets4 invalidates every artifact below it. For the same reason the next CI run rebuilds ProofWidgets4, Mathlib and everything behind them once.

Not covered

verso fails at DemoSite.Blog.Subprojects as it has since run 37777397573, taking the critical reference-manual, plus verso-slides and verso-web-components, down with it through the skip chain. That is #145, open since 2026-10-07 and MERGEABLE; the four repo directories are byte-identical to the commit at which that PR's fix was last verified green locally on this nightly. master needs both PRs.

🤖 Generated with Claude Code

`downstream: update repo mathlib4` (d29d62d) brought in
leanprover-community/mathlib4-nightly-testing@d274853, Anne Baanen's revert of the
`chore: downstream-lean4 adaptations for nightly-2026-10-07` export commit. That
commit carried the `mathlib4` half of #35, the adaptation for
leanprover/lean4#15002: core owns HTML-like syntax now, the in-tree `ProofWidgets4`
grew a `jsx%{…}` elaborator on top of it (`ProofWidgets.Data.Html.Elab`) and
deprecated its own `Jsx` term syntax, and mathlib4's 13 widget files moved over.

The revert is needed upstream — ProofWidgets' own `nightly-testing` has neither the
elaborator nor the deprecation, so `mathlib4-nightly-testing` has to keep using the
old syntax to build there at all — but downstream it leaves `mathlib4` using a syntax
the in-tree `ProofWidgets4` deprecates. With `--wfail` those warnings are the whole
failure: 52 sites, no `✖` anywhere.

So comment the `deprecated_syntax` line out until ProofWidgets' `nightly-testing`
carries the elaborator. `jsx%{…}` stays available and everything already migrated to
it — the elaborator itself, the `ProofWidgets.Demos`, `verso` — is untouched; the
monorepo just stops requiring a migration one of its consumers cannot make.

Re-applying the migration to `mathlib4` instead is not an option: its export job runs
with `pr: false`, pushing straight onto `mathlib4-nightly-testing`, so the next green
`master` would undo the revert within the hour.

Co-Authored-By: Claude Opus 5 <[email protected]>
@downstream-lean4

Copy link
Copy Markdown
Contributor Author

Build report for fix: ProofWidgets4 breakage from the mathlib4 nightly-testing revert

Turned green:

Repo Critical Build Test Lint
mathlib4 ✅ ✅ in 16m 39s ✅ in 44s ✅ in 1m 30s
cslib ✅ in 32s ✅ in 9s ✅ in 3s
Stayed red
Repo Critical Build Test Lint
reference-manual ✅ 🛑 by verso ⏭️ ⏭️
verso 🟥 in 1m 9s ⏭️ ⏭️
verso-slides 🛑 by verso ⏭️ ⏭️
verso-web-components 🛑 by verso ⏭️ ⏭️
Stayed green
Repo Critical Build Test Lint
aesop ✅ ✅ in 0s ✅ in 5s ⏭️
batteries ✅ ✅ in 0s ✅ in 4s ✅ in 2s
import-graph ✅ ✅ in 2s ✅ in 4s ⏭️
lean4-cli ✅ ✅ in 0s ✅ in 0s ⏭️
plausible ✅ ✅ in 0s ✅ in 2s ⏭️
ProofWidgets4 ✅ ✅ in 5s ✅ in 1s ⏭️
quote4 ✅ ✅ in 0s ✅ in 1s ⏭️
BibtexQuery ✅ in 3s ⏭️ ⏭️
comparator ✅ in 2s ⏭️ ⏭️
doc-gen4 ✅ in 6s ⏭️ ⏭️
illuminate ✅ in 1s ✅ in 10s ⏭️
lean4-unicode-basic ✅ in 0s ⏭️ ⏭️
lean4export ✅ in 0s ✅ in 6s ⏭️
LeanSearchClient ✅ in 0s ✅ in 0s ⏭️
leansqlite ✅ in 7s ✅ in 16s ⏭️
nerodia ✅ in 1s ✅ in 21s ⏭️
repl ✅ in 0s ✅ in 49s ⏭️

View run

@downstream-lean4

Copy link
Copy Markdown
Contributor Author

No longer needed: the downstream: update repo mathlib4 merge in 68af6a9 migrated mathlib4 to jsx%{…} literals, so the deprecated <…> term syntax has no users left in the tree and the deprecated_syntax line costs nobody a --wfail failure. Verified on master 81b76e9 (nightly-2026-10-14): mathlib4 lake build Mathlib Archive Counterexamples Wanted cache --wfail, lake test --iofail and lake lint all pass, as do ProofWidgets4 lake build ProofWidgets ProofWidgets.Demos --wfail and lake test --wfail, with the deprecation in place. Closing rather than merging so the deprecation upstream stands.

@downstream-lean4 downstream-lean4 Bot closed this Oct 14, 2026
@downstream-lean4
downstream-lean4 Bot deleted the push-ynvqxwupmmmk branch October 14, 2026 11:26
Kha pushed a commit that referenced this pull request Oct 14, 2026
`master` bumped to `nightly-2026-10-14` in ac06c20, and the `Build
subrepos` runs for
that commit and for the `#15581` merge on top of it were both cancelled
before any step
ran — so no CI run has ever looked at the new nightly. Built locally
instead, and
`reference-manual` (critical) is the one repo the bump breaks.

## reference-manual

lean4#15630 added `--add-downstream` and `--add-public-downstream` to
`lake shake`.
`Manual/BuildTools/Lake/CLI.lean` checks the `lake shake --help` output
verbatim, so
`Manual.BuildTools.Lake.CLI` now fails with ``Mismatched `lake --help`
output``.

The two options are inserted into the `lakeHelp shake` block, copied
from the nightly's
own `lake shake --help`, and added to the prose option list below it,
which enumerates
every option of the subcommand.

**Verified:** `lake build` passes (1583 jobs). reference-manual defines
neither a test
nor a lint driver, so that is its full matrix.

## State of the rest of `master` on `nightly-2026-10-14`

Everything else in `repos.toml` was built locally at 81b76e9 — all 22
repos, every
phase its lakefile defines:

* **Green:** aesop, batteries, BibtexQuery, doc-gen4, illuminate,
import-graph,
lean4-cli, lean4-unicode-basic, lean4export, LeanSearchClient,
leansqlite, mathlib4
(all five build targets with `--wfail`, `test --iofail`, `lint`),
plausible,
ProofWidgets4, quote4, repl, verso, verso-slides, verso-web-components.
* **cslib** is still red for the reason given in #166 (mathlib4#41506
making `Set` a
one-field structure); that PR applies cleanly to 81b76e9 and was
re-verified on this
nightly — `build --wfail --iofail`, `test --wfail --iofail` and `lint`
all pass with
  it. Not duplicated here.
* **nerodia** fails only on this machine: its `pyconfig` step wants
Python 3.14+ and the
  box has 3.13.15. Green in CI.

Two earlier unattended PRs are obsolete as of this nightly and have been
closed:

* #161 (batteries `extract_lets`) — lean4#15655 reverted the
realization-export change
that caused it. batteries now builds green without the patch, and *with*
it the added
`dsimp -zeta only` fails as "`dsimp` made no progress", so merging it
would re-break
  the repo.
* #158 (ProofWidgets4 `Jsx` deprecation) — the `downstream: update repo
mathlib4` merge
in 68af6a9 migrated mathlib4 to `jsx%{…}` literals, leaving the
deprecated syntax
with no users in the tree. mathlib4 and ProofWidgets4 both build green
with the
  `deprecated_syntax` line in place.

<!-- downstream-watch: unattended -->

Co-authored-by: downstream-lean4[bot] <downstream-lean4[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants