Disable tsc incremental compilation to prevent stale cache phantom errors#2277
Merged
hiroshinishio merged 1 commit intomainfrom Feb 19, 2026
Merged
Disable tsc incremental compilation to prevent stale cache phantom errors#2277hiroshinishio merged 1 commit intomainfrom
hiroshinishio merged 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--incremental falseto tsc to disable incremental compilation, preventing stale.tsbuildinfocache from causing phantom errors (e.g. reporting errors at line 73 in a 64-line file)tsconfig.jsonhad"incremental": true, so tsc creates.tsbuildinfoon every run. Once stale, subsequent runs report phantom errors from cached file state--incremental falseflag is present in the tsc commandTest plan
test_run_tsc_check_disables_incrementalSocial Media Post (GitAuto)
A customer's tsconfig.json had "incremental": true. tsc caches compilation state in .tsbuildinfo files. When GitAuto's agent rewrites a file between verification runs, tsc reads the stale cache and reports phantom errors - like "error at line 73" in a 64-line file. The agent rewrote correct code 7 times chasing a ghost. Fix: override with --incremental false on every tsc check.
Social Media Post (Wes)
tsc reported "syntax error at line 73." The file was 64 lines. Checked the code - it was correct. The customer's tsconfig had "incremental": true, so tsc cached compilation state in .tsbuildinfo. Between rewrites, the cache went stale and tsc kept checking against a ghost version of the file. 7 attempts, all correct, all "failed." --incremental false on our tsc check. Done.