Skip to content

Commit 1718fa2

Browse files
committed
Make _need_to_load not assume that file ordering remained the same
In Debian, we use disorderfs as part of checking reproducibility, and without this change test_caching failed: https://salsa.debian.org/python-team/packages/sphinx-autoapi/-/jobs/6643761
1 parent f5c7295 commit 1718fa2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

autoapi/_mapper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ def _need_to_load(self, files):
394394
if self.app.env.config_status != sphinx.environment.CONFIG_OK:
395395
return True
396396

397-
return last_files != files or not last_mtime or last_mtime < this_mtime
397+
return (
398+
set(last_files) != set(files) or not last_mtime or last_mtime < this_mtime
399+
)
398400

399401
def _find_files(self, patterns, dirs, ignore):
400402
for dir_ in dirs:

0 commit comments

Comments
 (0)