Open
Description
Describe the bug
Raising an error from an extension (or even a warning when using -W
) causes the next build to reprocess all files instead of resuming from the last error-free file. This makes development with -W
enabled in a large documentation project painful, because every small error requires a full-rebuild (for us in Coq, the read
phase takes about 1 minute).
To Reproduce
Steps to reproduce the behavior:
# Create an empty project
$ yes '' | sphinx-quickstart -p test -a me
# Create input files
$ echo test > a.rst
$ echo test > b.rst
$ echo '|error|' > c.rst
# Compile with -W
$ make SPHINXOPTS=-W html
Running Sphinx v1.8.2
making output directory...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 4 source files that are out of date
updating environment: 4 added, 0 changed, 0 removed
reading sources... [ 25%] a
reading sources... [ 50%] b
reading sources... [ 75%] c
reading sources... [100%] index
Warning, treated as error:
/tmp/test/c.rst:1:Undefined substitution referenced: "error".
Makefile:19: recipe for target 'html' failed
make: *** [html] Error 2
# Compile again:
$ make SPHINXOPTS=-W html
Running Sphinx v1.8.2
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 4 source files that are out of date
updating environment: 4 added, 0 changed, 0 removed
reading sources... [ 25%] a
reading sources... [ 50%] b
reading sources... [ 75%] c
reading sources... [100%] index
Warning, treated as error:
/tmp/test/c.rst:1:Undefined substitution referenced: "error".
Makefile:19: recipe for target 'html' failed
make: *** [html] Error 2
Expected behavior
Ideally, the second compilation pass should resume from c.rst
, since that's where the error was. Since a.rst
and b.rst
where successfully read, it would be super if they could be reloaded from disk on the next pass.
Environment info
- OS: GNU/Linux
- Python version: 3.5.2
- Sphinx version: 1.8.2
- Sphinx extensions: ø
- Extra tools: ø