Skip to content

Skip listing referenced projects when no files are left to check - #12

Merged
nitodeco merged 1 commit into
mainfrom
skip-empty-reference-listing
Nov 5, 2026
Merged

nitodeco merged 1 commit into
mainfrom
skip-empty-reference-listing

Conversation

@nitodeco

@nitodeco nitodeco commented Nov 5, 2026

Copy link
Copy Markdown
Member

When a staged file was deleted and no other staged file needs a project, tsc-staged still listed the files of every referenced project with tsc --listFilesOnly. In a monorepo where a package references a large dependency, this added several hundred milliseconds and a few hundred MB of memory for no result.

checkReferences now stops when no files are left to check, unless all referenced projects must be checked (a deleted file in a solution-style config).

The test for deleted files now asserts that no referenced project is listed. It fails without the change.

@nitodeco
nitodeco marked this pull request as ready for review November 5, 2026 01:12
@nitodeco
nitodeco requested a review from a team as a code owner November 5, 2026 01:12
@nitodeco
nitodeco merged commit 2688fdb into main Nov 5, 2026
6 checks passed
@nitodeco
nitodeco deleted the skip-empty-reference-listing branch November 5, 2026 01:14
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.

1 participant