Skip to content

Commit

Permalink
ENH: Say why something is out of date
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Aug 9, 2023
1 parent 6f5a99a commit 9ec0f89
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sphinx/environment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,22 @@ def get_outdated_files(self, config_changed: bool) -> tuple[set[str], set[str],
# this will do the right thing when dep is absolute too
deppath = path.join(self.srcdir, dep)
if not path.isfile(deppath):
logger.debug(
'[build target] changed %r '
'missing dependency %r',
docname,
deppath)
changed.add(docname)
break
depmtime = _last_modified_time(deppath)
if depmtime > mtime:
logger.debug(
'[build target] outdated %r '
'from dependency %r: %s -> %s',
docname,
deppath,
datetime.utcfromtimestamp(mtime),
datetime.utcfromtimestamp(depmtime))
changed.add(docname)
break
except OSError:
Expand Down

0 comments on commit 9ec0f89

Please sign in to comment.