<#17526 Mypy cache is shared across all repos usin...
# github-notifications
q
#17526 Mypy cache is shared across all repos using pants New issue created by huonw Describe the bug Per https://pantsbuild.slack.com/archives/C046T6T9U/p1668121011324399, the new append-only mypy cache has a single instance per python version, and thus potentially incorporates information across repositories that makes the cache inefficient. For instance, on my machine:
Copy code
tree ~/.cache/pants/named_caches/mypy_cache/               
# /Users/huon/.cache/pants/named_caches/mypy_cache/
# ├── 3.7
# │   └── cache.db
# ├── 3.8
# │   └── cache.db
# └── 3.9
#     └── cache.db
# 
# 3 directories, 3 files

# a sample of 30 random paths:
sqlite3 ~/.cache/pants/named_caches/mypy_cache/3.9/cache.db 'SELECT path FROM files ORDER BY random() LIMIT 30'
The sample of the paths includes things like
pants/backend/codegen/export_codegen_goal.data.json
(from the pants repo),
tabulate/__init__.meta.json
(from a dependency), and paths from our internal repo source roots. Pants version 2.14 OS macOS Additional info N/A pantsbuild/pants