fix: prevent tsconfig cache pollution with separate raw and built caches#970
Merged
fix: prevent tsconfig cache pollution with separate raw and built caches#970
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #970 +/- ##
==========================================
- Coverage 94.36% 94.17% -0.20%
==========================================
Files 17 17
Lines 3321 3346 +25
==========================================
+ Hits 3134 3151 +17
- Misses 187 195 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging this PR will improve performance by 4.38%Comparing Summary
Performance Changes
Footnotes
|
Fixes #963 The cache previously stored tsconfigs keyed only by path, which caused pollution when the same tsconfig was loaded with different `root` values. This change: - Adds `should_build` flag to TsConfig to control path normalization separately from the `root` flag - Splits the tsconfig cache into two: - `tsconfigs_raw`: stores tsconfigs after callback but before build - `tsconfigs_built`: stores tsconfigs after callback and build - For root=true (resolution): uses built cache - For root=false (extending): uses raw cache Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
a6fb3e8 to
941cb0f
Compare
This was referenced Jan 14, 2026
Merged
sapphi-red
reviewed
Jan 14, 2026
Comment on lines
+299
to
+301
|
|
||
| // NOTE: should remove this line before merging as it's not thread safe | ||
| std::env::set_current_dir(&f2).unwrap(); |
Member
There was a problem hiding this comment.
@Boshen I think you want to remove this as it may cause flaky failures.
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
root: trueandroot: falsecausing incorrect resolution #963should_buildflag to TsConfig to control path normalization separately from therootflagtsconfigs_raw(after callback, before build) andtsconfigs_built(after callback and build)root=true(resolution): uses built cacheroot=false(extending): uses raw cacheTest plan
root: trueandroot: falsecausing incorrect resolution #963 passjust lintpassesjust fmtpasses🤖 Generated with Claude Code