Repository navigation
docs: sphinx-build -j auto everywhere the HTML build runs - #4501
Conversation
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟡 Changes recommended
One documentation inconsistency remains: the PR’s claim that all Sphinx HTML build instructions use -j auto is contradicted by skills/internal/make_pr.md still showing a sphinx-build -b html ... command without it, so the guidance needs alignment before approval.
1 open issue
What changed in this PR
This pull request updates Sphinx HTML build invocations across CI, CMake doc targets, preflight gating, and developer-facing scripts/docs to pass -j auto, enabling parallel Sphinx builds on platforms where Sphinx can fork (and remaining effectively a no-op on Windows).
Changes:
- Enable parallel Sphinx HTML builds (
sphinx-build -j auto) in GitHub Pages workflow and CMake documentation targets. - Update the preflight
docs/sphinx-htmlgate to use-j auto. - Align local helper scripts and documentation recipes with the parallel build flag (noting platform behavior).
Review notes (unresolved):
doc/make.sh:siteuses-j auto, but thehtmltarget still runs serial; consider updatingdirhtmlas well for consistency. (moderate)doc/make.bat:siteuses-j auto, but thehtmltarget below still runs without it; consider updatingdirhtmlas well. (moderate)skills/internal/preflight.md: references indicateskills/internal/make_pr.mdstill documents an HTML build command without-j auto; update the recipe or narrow the “everywhere” claim. (nit)
| File | Summary |
|---|---|
utils/internal/preflight/main.das |
Passes -j auto in the docs/sphinx-html preflight gate. |
skills/internal/preflight.md |
Updates preflight docs to mirror the parallel Sphinx HTML command and platform behavior notes. |
skills/internal/documentation_rst.md |
Updates documentation workflow recipe to include -j auto. |
site/README.md |
Updates site/docs build instructions to use -j auto. |
modules/dasImgui/README.md |
Updates module doc build instructions to include -j auto. |
doc/make.sh |
Adds -j auto to the site build path; html target still appears serial. |
doc/make.bat |
Adds -j auto to the site build path; html target still appears serial. |
doc/make_site.sh |
Updates the site build helper script to invoke Sphinx with -j auto. |
doc/CMakeLists.txt |
Adds -j auto to Sphinx HTML invocations in documentation-related targets. |
.github/workflows/pages.yml |
Updates the Pages “Build Sphinx HTML” step to run with -j auto. |
This pull request requires changes.
Review effort: Balanced
4ce4aac to
e661437
Compare
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟢 Approval recommended
The documented changes consistently propagate -j auto to the key CI, CMake, preflight, and developer-facing Sphinx HTML build paths, with only minor nits noted and no outstanding blockers reported in the review evidence.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
e661437 to
9643dce
Compare
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟡 Changes recommended
Two moderate issues remain where the default html targets in doc/make.sh and doc/make.bat still invoke Sphinx without -j auto, conflicting with the stated intent and leaving the primary HTML build path unoptimized.
2 open issues
Review effort: Balanced
Every Sphinx HTML build in the tree ran on one process: the pages.yml step, the two CMake targets behind the doc lane, preflight's docs gate, and the local scripts and skill recipes that mirror them. All five of our extensions (daslang, myst_parser, sphinx_sitemap, tutorial_video, icon_role) declare parallel_read_safe and parallel_write_safe, so the flag was simply never passed. Every call site now passes -j auto. Sphinx spreads the read and write phases over every core on Linux and macOS. It parallelizes only where it can fork, so on Windows the same flag runs one process and changes nothing - the preflight gate on a Windows box stays as it was. The two rinohtype PDF scripts are left alone: they are Windows-only and drive Sphinx from a worker thread. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
9643dce to
382769d
Compare
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟢 Approval recommended
The change is a straightforward, consistent update to Sphinx build invocations and related documentation to add the platform-safe -j auto flag across CI, CMake targets, and helper scripts, with no active issues identified as blocking approval.
No open issues 🎉
2 resolved since last review
Review effort: Balanced


Behavior change: every Sphinx HTML build in the tree runs with
-j auto- the Pages step, the two CMake doc targets, preflight's docs gate, and the local scripts and skill recipes that mirror them.Why. The HTML build ran on one process everywhere. All five extensions the docs load (
daslang,myst_parser,sphinx_sitemap,tutorial_video,icon_role) declareparallel_read_safeandparallel_write_safe, so nothing stood in the way - the flag was simply never passed.What changes.
.github/workflows/pages.yml: the "Build Sphinx HTML" step passes-j auto.doc/CMakeLists.txt:das_documentationandbuild_doc(therun_doclane) pass-j auto.utils/internal/preflight/main.das: thedocs/sphinx-htmlgate passes-j auto.doc/make.sh,doc/make.bat,doc/make_site.sh,site/README.md,modules/dasImgui/README.md,skills/internal/documentation_rst.md,skills/internal/preflight.md,skills/internal/make_pr.mdstep 4f (review round one): the same flag in every recipe a reader copies;preflight.mdsays where it does and does not parallelize.doc/make_pdf.ps1anddoc/make_pdf.bat(Windows-only, Sphinx driven from a worker thread).Observable behavior.
-Wis unaffected.ubuntu-latest(4 vCPU): the Sphinx step took 3 min 55 s serial. Pages runs on a master push, so the parallel number comes from the first Pages run after this merges./mnt/dmount, output on native disk,-W --keep-going, serial then-j autoback to back from an empty doctree): serial 585.2 s ->-j auto62.2 s, both exit 0 with no warning, the same page set written.Where to look.
.github/workflows/pages.yml"Build Sphinx HTML",doc/CMakeLists.txtbuild_doc,utils/internal/preflight/main.dasthedocs/sphinx-htmlgate.Validation, claims, ledger
Validation
utils/lint/main.das -- utils/internal/preflight/main.das: PASS, 0 issues.dastest --test utils/internal/preflight/tests: 32 tests, 32 passed..github/workflows/REVIEW.das: clean.git diff --check: clean.doc/requirements.txt) in a WSL venv,-W --keep-going, the fulldoc/sourcewith the generated pages and the staged recordings, serial and-j autoback to back: 585.2 s and 62.2 s, bothrc=0, neither log carries a warning. The mount inflates the serial time (every source read crosses/mnt/d), so the ratio on a native disk and on the 4-vCPU runner is smaller; the first Pages run after the merge is the CI number.sphinx.util.parallel.parallel_availableisFalse(Sphinx gates it onos.name == 'posix'and aforkcontext); the builder checks that flag before the job count, so-j autois inert there and prints nothing.Claims - stated, not tested
Not done