sphinx-doc / sphinx-doc/sphinx

After a SphinxError incremental behaviour does not work

Open
#11,076 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

builder internals:other
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Whenever a "SphinxError" is raised, the next build is always a full build without using the pickles. This causes usability issues in large projects whenever an error is created in a file and fixed.

The expectation is that only the changed file (where the error is fixed) is rebuilt.

How to Reproduce
  1. Do a sphinx-build
  2. Do a second sphinx-build without making any changes (to make sure that incremental build works)
  3. Introduce any error in a single file which raises a SphinxError (not a SphinxWarning) and do a sphinx-build
  4. Fix the error in the single file and do a sphinx-build again

All source files are marked as changed and read in again.

Environment Information
Sphinx: 5.3.0
Sphinx extensions

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the four-step sequence with sphinx-build: establish an incremental build, introduce and fix a SphinxError in one file, and observe which sources are read. The fix is done when the build after the correction reuses the pickles and rebuilds only the changed file rather than marking every source as changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.