Skip to content

option to disable mypy caching#23146

Merged
cburroughs merged 1 commit intopantsbuild:mainfrom
cburroughs:csb/mypy-cache-disable
Mar 5, 2026
Merged

option to disable mypy caching#23146
cburroughs merged 1 commit intopantsbuild:mainfrom
cburroughs:csb/mypy-cache-disable

Conversation

@cburroughs
Copy link
Copy Markdown
Contributor

We do a lot of work (see history of mypy/rules.py) to provide a working solution for the mypy cache and to move it around between sandboxes correctly. Unfortunately, sometimes bugs in mypy or Pants prevent the cache from being viable -- see the looong journey in #18519 -- and the user might reasonably want to disable the cache entirely in those situation. (In my DAYJOB repo for example, the mypy sqlite cache is > 700 MiB which is a lot of write out and get no value from. They can't do --no-incremental because that still writes the cache python/mypy#19489 so we need to facilitate pointing to /dev/null

We do a lot of work (see history of mypy/rules.py) to provide a
working solution for the mypy cache and to move it around between
sandboxes correctly.  Unfortunately, sometimes bugs in mypy or Pants
prevent the cache from being viable -- see the looong journey in
pantsbuild#18519 -- and the user might
reasonably want to disable the cache entirely in those situation.  (In
my DAYJOB repo for example, the mypy sqlite cache is > 700 MiB which
is a lot of write out and get no value from. They can't do
--no-incremental because that still writes the cache
python/mypy#19489 so we need to facilitate
pointing to /dev/null
@cburroughs cburroughs self-assigned this Feb 27, 2026
@cburroughs cburroughs marked this pull request as ready for review February 28, 2026 01:37
Copy link
Copy Markdown
Contributor

@benjyw benjyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@cburroughs cburroughs merged commit d640b4a into pantsbuild:main Mar 5, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants