Skip to content

Commit

Permalink
When loading from a fine-grained cache, use the real path, not the ca…
Browse files Browse the repository at this point in the history
…ched (#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.
  • Loading branch information
msullivan authored Feb 8, 2018
1 parent f3491a3 commit 7b7ea3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/dmypy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def initialize_fine_grained(self, sources: List[mypy.build.BuildSource]) -> Dict
for meta, mypyfile, type_map in manager.saved_cache.values():
if meta.mtime is None: continue
self.fswatcher.set_file_data(
meta.path,
mypyfile.path,
FileData(st_mtime=float(meta.mtime), st_size=meta.size, md5=meta.hash))

# Run an update
Expand Down

0 comments on commit 7b7ea3b

Please sign in to comment.