Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always say why something is out of date #11572

Merged
merged 12 commits into from Aug 10, 2023
17 changes: 17 additions & 0 deletions sphinx/environment/__init__.py
Expand Up @@ -502,10 +502,27 @@ 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:
depmtime_dt = datetime.utcfromtimestamp(depmtime)
depmtime_str = str(depmtime_dt)
larsoner marked this conversation as resolved.
Show resolved Hide resolved
mtime_dt = datetime.utcfromtimestamp(mtime)
mtime_str = str(mtime_dt)
larsoner marked this conversation as resolved.
Show resolved Hide resolved
logger.debug(
'[build target] outdated %r '
'from dependency %r: %s -> %s',
docname,
deppath,
mtime_str,
depmtime_str,
)
changed.add(docname)
break
except OSError:
Expand Down