Skip to content

Commit

Permalink
Revert "Builder.build: save env also with only new documents"
Browse files Browse the repository at this point in the history
This reverts commit 20f625b, 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.
  • Loading branch information
eqvinox committed Oct 11, 2018
1 parent 9875a57 commit d15d11d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sphinx/builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,14 @@ def build(self, docnames, summary=None, method='update'):
else:
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:
# 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
self.app.phase = BuildPhase.CONSISTENCY_CHECK
logger.info(bold(__('checking consistency... ')), nonl=True)
Expand Down

0 comments on commit d15d11d

Please sign in to comment.