Revert "Builder.build: save env also with only new documents"

This reverts commit 20f625b4d3, which
introduced a regression in dependency tracking for build systems
invoking sphinx-build (described in issue #5501.)

The correct solution is to properly track when the pickle file needs to
be written;  unfortunately I don't know enough about sphinx to implement
this.  Also, I'm not sure the intersphinx cache belongs into this at
all.
This commit is contained in:
David Lamparter 2018-10-11 17:22:39 +02:00
parent 9875a57622
commit d15d11df70

View File

@ -369,14 +369,14 @@ class Builder(object):
else: else:
logger.info(__('none found')) logger.info(__('none found'))
# save the environment
from sphinx.application import ENV_PICKLE_FILENAME
logger.info(bold(__('pickling environment... ')), nonl=True)
with open(path.join(self.doctreedir, ENV_PICKLE_FILENAME), 'wb') as f:
pickle.dump(self.env, f, pickle.HIGHEST_PROTOCOL)
logger.info(__('done'))
if updated_docnames: if updated_docnames:
# save the environment
from sphinx.application import ENV_PICKLE_FILENAME
logger.info(bold(__('pickling environment... ')), nonl=True)
with open(path.join(self.doctreedir, ENV_PICKLE_FILENAME), 'wb') as f:
pickle.dump(self.env, f, pickle.HIGHEST_PROTOCOL)
logger.info(__('done'))
# global actions # global actions
self.app.phase = BuildPhase.CONSISTENCY_CHECK self.app.phase = BuildPhase.CONSISTENCY_CHECK
logger.info(bold(__('checking consistency... ')), nonl=True) logger.info(bold(__('checking consistency... ')), nonl=True)