-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
I noticed that the mypy cache will mark almost everything as stale if the cache was produced with a venv different from the one running mypy. I think this is due to a full path being placed into cache files & interface_hashes, for files that are stdlib or packages. Then those packages, and everything depending on them, gets invalidated (which ends up being 99% of everything in big projects). I think it would be cool if the cache were more agnostic to this, for two reasons:
- when testing locally, I occasionally use a second venv with maybe 1 or 2 different packages to test out changes (maybe a package upgraded or added types). Ideally only those packages and their descendants would be invalidated.
- when trying out remote caches, the CI venv will be "different" (existing at a different path), but the lockfile will be exactly the same. Ideally nothing would be invalidated.
Reactions are currently unavailable