Builder.build: save env also with only new documents

Saving/pickling the environment is necessary for intersphinx to have its
cache saved.

Currently a new build would fetch the inventories, but the cache would
not get saved.

This appears to break no existing test, but should probably get a new
one then?
This commit is contained in:
Daniel Hahler 2018-06-11 02:27:27 +02:00
parent 2855721d0b
commit 20f625b4d3

View File

@ -372,7 +372,6 @@ class Builder(object):
else: else:
logger.info(__('none found')) logger.info(__('none found'))
if updated_docnames:
# save the environment # save the environment
from sphinx.application import ENV_PICKLE_FILENAME from sphinx.application import ENV_PICKLE_FILENAME
logger.info(bold(__('pickling environment... ')), nonl=True) logger.info(bold(__('pickling environment... ')), nonl=True)
@ -380,6 +379,7 @@ class Builder(object):
pickle.dump(self.env, f, pickle.HIGHEST_PROTOCOL) pickle.dump(self.env, f, pickle.HIGHEST_PROTOCOL)
logger.info(__('done')) logger.info(__('done'))
if updated_docnames:
# 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)