From d4ab90ea9f3a18af3c72af8b6ad11752c87d1389 Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Thu, 8 Feb 2018 11:15:10 -0800 Subject: [PATCH] When loading from a fine-grained cache, use the real path, not the cached 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. --- mypy/dmypy_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/dmypy_server.py b/mypy/dmypy_server.py index 5428ad7969a0..4e3b47a68c18 100644 --- a/mypy/dmypy_server.py +++ b/mypy/dmypy_server.py @@ -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