Skip to content

fix: reference-manual breakage from nightly-2026-09-06 - #51

Closed
Kha wants to merge 1 commit into
masterfrom
push-ltnuxuonxwwr
Closed

fix: reference-manual breakage from nightly-2026-09-06#51
Kha wants to merge 1 commit into
masterfrom
push-ltnuxuonxwwr

Conversation

@Kha

@Kha Kha commented Sep 6, 2026

Copy link
Copy Markdown
Member

Adapts reference-manual to lean4#15015 ("lake: precompileLibrary &
precompileImports", merged 2026-09-05, first in nightly-2026-09-06).

reference-manual (critical)

Lake's LeanConfig gained a precompileImports field and LeanLibConfig a
precompileLibrary field. The manual embeds elaborated package configurations
verbatim in ```expected blocks, so every one of them was two lines
short and Manual.BuildTools.Lake.Config failed with

error: Manual/BuildTools/Lake/Config.lean:139:0: Mismatched elaborated configuration output:
...
            platformIndependent := none,
+           precompileImports := false,

at six sites. Added precompileImports := false after platformIndependent in
every embedded LeanConfig, and precompileLibrary := false in the lean_lib
configurations (lean_exe configurations do not have the field), in
Manual/BuildTools/Lake/Config.lean and Manual/BuildTools/Lake.lean. The
latter had not even been reached by the build, since it imports the former.

Only the embedded outputs are updated here; the two new fields are not yet
described in the TOML field documentation, which is an editorial decision for
the manual's authors.

Verified: lake build completes, 1180/1180 jobs, on nightly-2026-09-06.
reference-manual defines neither a test nor a lint driver — lake check-test
and lake check-lint both exit 1 — so lake build is the whole of its CI.

CI has not seen this failure at all, and will not see the fix either:
reference-manual has been skipped behind verso since 2026-09-03, so this
PR's own run will skip it too. The verification above is local.

Also verified locally, unchanged

verso-web-components (build) and verso-slides (build, lake test -- --no-playwright) are green on nightly-2026-09-06. Like reference-manual
they are red in CI only through the skip chain behind verso; unlike it, they
needed no adaptation.

Not fixed here

cslib is already covered by #50 (MERGEABLE), which carries exactly the
one-line rwa fix for the rwaSuggestion linter failure that this run still
shows. Nothing added here.

verso — the shared-subverso-build-directory problem, fourth day. All 61
diagnostics in this run's verso section are failed to read file '…/subverso/.lake/build/lib/lean/SubVerso/Highlighting/Highlighted.olean', incompatible header; 1106 of 1114 targets built and the remaining diagnostics
are non-fatal warnings, so there is no source adaptation to make. The
incompatible header wording pins the mechanism down further than before:

  • .downstream/downstream/updater.py writes a package-overrides.json for
    every lake-manifest.json under a subrepo, including
    verso/test-projects/*/, all redirecting subverso to the one shared
    subverso/ checkout;
  • four of those nested projects pin leanprover/lean4:v4.31.0
    (anchor-examples, documented-package, website-examples,
    website-literate) while the monorepo builds on nightly-2026-09-06;
  • Verso.Code.External builds those projects with elan run --install …
    during the outer verso build, so a v4.31.0 Lake writes v4.31.0 oleans
    into subverso/.lake/build while the outer nightly build reads them.

Two toolchains sharing one build directory cannot be serialized out of this;
the fix belongs in .downstream/ or repos.toml (stop sharing the directory
for the nested projects), which unattended runs must not touch.

`lean4#15015` added the `precompileImports` field to Lake's `LeanConfig` and
`precompileLibrary` to `LeanLibConfig`. The manual embeds elaborated package
configurations verbatim in `expected` blocks, so all of them were missing the
new fields and `Manual.BuildTools.Lake.Config` failed with `Mismatched
elaborated configuration output`.

Added `precompileImports := false` after `platformIndependent` in every
embedded `LeanConfig`, and `precompileLibrary := false` in the `lean_lib`
configurations, in `Manual/BuildTools/Lake/Config.lean` and
`Manual/BuildTools/Lake.lean`.

CI never saw this: `reference-manual` has been skipped behind the `verso`
failure since the shared-`subverso` build-directory problem started.

Verified: `lake build` completes (1180/1180). The repo defines no test or lint
driver, so `lake check-test`/`lake check-lint` fail and CI skips both phases.
@downstream-lean4

Copy link
Copy Markdown
Contributor

Build report for fix: reference-manual breakage from nightly-2026-09-06

Stayed red
Repo Critical Build Test Lint
reference-manual ⏭️ ⏭️ ⏭️
cslib 🟥 in 4s ⏭️ ⏭️
verso 🟥 in 49s ⏭️ ⏭️
verso-slides ⏭️ ⏭️ ⏭️
verso-web-components ⏭️ ⏭️ ⏭️
Stayed green
Repo Critical Build Test Lint
aesop ✅ in 7s ✅ in 4s ⏭️
batteries ✅ in 4s ✅ in 4s ✅ in 2s
import-graph ✅ in 2s ✅ in 4s ⏭️
lean4-cli ✅ in 1s ✅ in 0s ⏭️
mathlib4 ✅ in 183s ✅ in 42s ✅ in 94s
plausible ✅ in 1s ✅ in 2s ⏭️
ProofWidgets4 ✅ in 3s ✅ in 1s ⏭️
quote4 ✅ in 2s ✅ in 1s ⏭️
BibtexQuery ✅ in 1s ⏭️ ⏭️
comparator ✅ in 2s ⏭️ ⏭️
doc-gen4 ✅ in 6s ⏭️ ⏭️
illuminate ✅ in 3s ✅ in 11s ⏭️
lean4-unicode-basic ✅ in 2s ⏭️ ⏭️
lean4export ✅ in 0s ✅ in 8s ⏭️
LeanSearchClient ✅ in 1s ✅ in 0s ⏭️
leansqlite ✅ in 4s ✅ in 19s ⏭️
nerodia ✅ in 2s ✅ in 21s ⏭️
repl ✅ in 1s ✅ in 59s ⏭️
subverso ✅ in 6s ⏭️ ⏭️

View run

@Kha

Kha commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Superseded: master has meanwhile taken upstream's own version of these listings through a downstream: update repo reference-manual merge — Manual/BuildTools/Lake.lean and Manual/BuildTools/Lake/Config.lean now carry the precompileImports/precompileLibrary fields this PR was filling in, and reference-manual built green in run 34180042869. Nothing left to merge here.

@Kha Kha closed this Sep 8, 2026
@Kha
Kha deleted the push-ltnuxuonxwwr branch September 8, 2026 03:24
Kha added a commit that referenced this pull request Sep 8, 2026
Adapts `cslib` to two deprecations that the `downstream: update repo
cslib` merge
(ffe4553, the head of [run
34142798876](https://github.com/leanprover/downstream-lean4/actions/runs/34142798876))
brought in. Supersedes #53, which carried one of these two hunks and has
been made
`CONFLICTING` by that same merge.

### cslib (noncritical, `--wfail --iofail`)

The merge added

```lean
@[deprecated _root_.refl (since := "2026-09-07")]
theorem MJoin.refl (a : α) : MJoin r a a := _root_.refl a
```

in `Cslib/Foundations/Relation/Basic.lean`, and moved the existing
`@[deprecated Relation.ReflGen.stdSymm]` on `ReflGen.symmGen_symm` out
of
`Confluence.lean` into that same file. In both cases the replacement is
a
`Std.Refl`/`Std.Symm` *instance* rather than the lemma it replaces, so
since
lean4#14600 the deprecation linter reports a type mismatch:

```
warning: Cslib/Foundations/Relation/Basic.lean:60:2: The updated constant has a different type:
  ∀ {α : Sort u_1} {r : α → α → Prop} [Std.Refl r] (a : α), r a a
instead of
  ∀ {α : Type u_1} {r : α → α → Prop} (a : α), MJoin r a a
```

`cslib` builds with `--wfail`, so both warnings are build failures. The
type
difference is intended — callers are meant to go through `_root_.refl`
and
`Std.Symm.symm`, which is also how the two lemmas are proved — so this
marks both
with `+typeChanged` (syntax from lean4#14570).

Because #53 fixed the `ReflGen.symmGen_symm` site at its old location in
`Confluence.lean`, it no longer applies and this PR replaces it. The
`MJoin.refl`
site is new in this run.

**Verified** on `nightly-2026-09-06`: `lake build --wfail --iofail`
(3212 jobs),
`lake test --wfail --iofail` (9094 jobs) and `lake lint` all pass for
`cslib`. The
build/test/lint runs also had #50's one-line `rwa` hunk applied in the
working copy,
because without it the build stops at
`Cslib.Computability.Languages.MyhillNerode`
before the later phases can run; the two changes are in different files
and
independent. With this commit alone, `Cslib.Foundations.Relation.Basic`
builds clean
and `MyhillNerode` is the only remaining logged failure.

### Not fixed here — already covered by open PRs

**`cslib`'s other failure**,
`Cslib.Computability.Languages.MyhillNerode` under
mathlib's `rwaSuggestion` linter, is #50, still `MERGEABLE` and still
applying to
the current sources. Both it and this PR are needed for `cslib` to
build.

**`reference-manual`**, the one critical repo in the red set, is #51,
still
`MERGEABLE`. Its only logged failure in this run is
`Manual.BuildTools.Lake.Config`
at exactly the six `Mismatched elaborated configuration output` sites
that #51 fills
in for `lean4#15015`'s new `precompileImports` / `precompileLibrary`
fields. Nothing
added here.

<!-- downstream-watch: unattended -->
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.

1 participant