Skip to content

docs: nest doc-gen4 in a docbuild/ sub-project (mathlib pattern)#2

Merged
gotrevor merged 2 commits into
masterfrom
docbuild-rewire
Jun 21, 2026
Merged

docs: nest doc-gen4 in a docbuild/ sub-project (mathlib pattern)#2
gotrevor merged 2 commits into
masterfrom
docbuild-rewire

Conversation

@gotrevor

Copy link
Copy Markdown
Owner

Stacked on #1 (the v4.31 bump) — the diff/CI here also includes #1's commits until that merges, then self-cleans.

Re-wires doc-gen4 per its own recommended usage pattern: build docs from a nested docbuild/ sub-project instead of a direct [[require]] in the main lakefile. Benefits:

  • Removes doc-gen4 + MD4Lean/BibtexQuery/UnicodeBasic/leansqlite from the main lake build and lake-manifest.json.
  • Downstream consumers of Foundation no longer inherit doc-gen4 in their dependency graph.
  • Matches mathlib's practice (mathlib keeps doc-gen4 out of its own manifest entirely; builds docs out-of-band).

Changes

  • lakefile.toml: drop the doc-gen4 require.
  • lake-manifest.json: regenerated — doc-gen4 + its 4 deps gone, mathlib pin unchanged.
  • docbuild/lakefile.toml + docbuild/lake-manifest.json: new nested docs project (doc-gen4 pinned v4.31.0, Foundation required by path, shares ../.lake/packages).
  • CI: Build docscd docbuild && lake build Foundation:docs; artifact + deploy paths → docbuild/.lake/build/doc.

⚠️ Mechanical change produced with Claude Code; this PR's CI is the verification of the new docs wiring.

gotrevor and others added 2 commits June 21, 2026 16:37
lean-toolchain v4.29.0 -> v4.31.0; mathlib and doc-gen4 requires bumped to
v4.31.0, with the source migration across the Foundation library (133
files). sorry/admit baseline unchanged (27, all pre-existing upstream).

doc-gen4 pinned to its v4.31.0 tag (upstream tracked `main`); flip back to
`main` if preferred.

Mechanical port produced with Claude Code; not yet human-reviewed.
Porting cheat sheet:
https://github.com/gotrevor/mathlib-bump-cookbook/blob/main/v4.29.1-to-v4.31.0.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Moves doc-gen4 out of the main lakefile into a nested `docbuild/`
sub-project, per doc-gen4's own recommended usage pattern. The main
`lake build` and lake-manifest.json no longer pull in doc-gen4 +
MD4Lean / BibtexQuery / UnicodeBasic / leansqlite; downstream consumers
of Foundation no longer inherit them either. Mirrors mathlib, which keeps
doc-gen4 out of its own manifest entirely.

Docs build moves to `cd docbuild && lake build Foundation:docs` (output at
docbuild/.lake/build/doc); CI docs/artifact/deploy steps updated to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gotrevor gotrevor merged commit 6400bff into master Jun 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant