Skip to content

cache source and --force for type checkers#23109

Open
cburroughs wants to merge 1 commit intopantsbuild:mainfrom
cburroughs:csb/check-force
Open

cache source and --force for type checkers#23109
cburroughs wants to merge 1 commit intopantsbuild:mainfrom
cburroughs:csb/check-force

Conversation

@cburroughs
Copy link
Contributor

This started as adding --force because I had confused myself several times benchmarking and forgetting to dirty the right cache at the right time. I think that like --test-force, --check-force "shouldn't" be needed, but sometimes it is. (Since the case is more marginal for checking we could make it advanced, but leaned towards the consistency with the test goal.)

I couldn't mirror the --test-force test without widening the scope to pass along RunId. That was added for #13889 which would also be valuable for all the same reasons exposing that information for tests was. (To be clear, I was not aware that pants check :: could be "cached locally"!)

The Golang/JVM subsystems approach type checking is different (aka the compiler does it) and are thus unchanged.

Typescript is another different challenge because it partitions by directory. Added a flag so that typescript can retain the old 'single line' ✓ typescript succeeded. behavior since getting a line for each directory seemed like far too much.

(I fiddled a bit with trying to get repositories with only a single (resolve,IC) to omit the partition name but I didn't like what the coupling looked like.)

@cburroughs cburroughs self-assigned this Feb 19, 2026
This started as adding --force because I had confused myself several
times benchmarking and forgetting to dirty the right cache at the
right time.  I think that like `--test-force`, `--check-force`
"shouldn't" be needed, but sometimes it is. (Since the case is more
marginal for checking we could make it `advanced`, but leaned towards
the consistency with the test goal.)

I couldn't mirror the `--test-force` test without widening the scope
to pass along `RunId`.  That was added for pantsbuild#13889 which would also be
valuable for all the same reasons exposing that information for tests
was. (To be clear, I was not aware that `pants check ::` could be
"cached locally"!)

The Golang/JVM subsystems approach type checking is different (aka the
compiler does it) and are thus unchanged.

Typescript is another different challenge because it partitions by
directory. Added a flag so that typescript can retain the old 'single
line' `✓ typescript succeeded.` behavior since getting a line for each
directory seemed like far too much.

(I fiddled a bit with trying to get repositories with only a
single (resolve,IC) to omit the partition name but I didn't like what
the coupling looked like.)
@cburroughs
Copy link
Contributor Author

(Re test failure --> #23108)

@cburroughs cburroughs marked this pull request as ready for review February 19, 2026 20:00
@riisi
Copy link
Contributor

riisi commented Feb 20, 2026

I didn't realise the --test-force option existed for tests. Should it be added here? docs/using-pants/troubleshooting-common-issues

How would users expect this to work with named_caches - e.g. the mypy cache? As proposed, mypy cache would still be used.

Thanks for the report re. node lockfiles.

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

Comments