Skip to content

Commit 7b7ea3b

Browse files
authored
When loading from a fine-grained cache, use the real path, not the cached (#4555)
The path in the cache file will be a full path possibly from some build machine, and so might not match what is actually on disk locally. This can cause changes to be missed in the initial run.
1 parent f3491a3 commit 7b7ea3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/dmypy_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def initialize_fine_grained(self, sources: List[mypy.build.BuildSource]) -> Dict
281281
for meta, mypyfile, type_map in manager.saved_cache.values():
282282
if meta.mtime is None: continue
283283
self.fswatcher.set_file_data(
284-
meta.path,
284+
mypyfile.path,
285285
FileData(st_mtime=float(meta.mtime), st_size=meta.size, md5=meta.hash))
286286

287287
# Run an update

0 commit comments

Comments
 (0)