Skip declaration emit without a prior signature - #4726
Skip declaration emit without a prior signature#4726Jake Bailey (jakebailey) wants to merge 2 commits into
Conversation
Cover an incremental noEmit build where a change propagates through a re-export and its importer after source versions were stored as signatures.
When an unchanged importer has signature == version, there is no previous declaration signature available for comparison. Computing one may allow propagation to stop, but requires declaration emit. Skip that refinement and conservatively continue through the importer graph instead.
There was a problem hiding this comment.
Pull request overview
Optimizes incremental builds by avoiding unnecessary declaration-signature emission when no prior declaration signature exists.
Changes:
- Conservatively propagates affected files without computing missing declaration signatures.
- Adds re-export propagation coverage.
- Updates incremental, no-emit, build, and watch baselines.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
internal/execute/incremental/affectedfileshandler.go |
Skips unnecessary declaration-signature computation. |
internal/execute/tsctests/tsc_test.go |
Adds re-export propagation scenario. |
testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js |
Records the new scenario. |
testdata/baselines/reference/tsc/incremental/const-enums.js |
Updates const-enum incremental output. |
testdata/baselines/reference/tsc/incremental/const-enums-aliased.js |
Updates aliased const-enum output. |
testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js |
Updates cross-file alias output. |
testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js |
Updates class-expression incremental output. |
testdata/baselines/reference/tsc/noEmit/changes-incremental.js |
Updates no-emit incremental state. |
testdata/baselines/reference/tsc/noEmit/changes-with-initial-noEmit-incremental.js |
Updates initial no-emit state. |
testdata/baselines/reference/tsbuild/noEmit/changes-incremental.js |
Updates build-mode no-emit output. |
testdata/baselines/reference/tsbuild/noEmit/changes-with-initial-noEmit-incremental.js |
Updates initial build-mode no-emit output. |
testdata/baselines/reference/tscWatch/commandLineWatch/watch-handles-file-rapidly-recreated.js |
Removes redundant watch signature computation. |
testdata/baselines/reference/tscWatch/commandLineWatch/watch-detects-change-in-symlinked-node_modules-file.js |
Updates symlink watch signature behavior. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
TypeScript Bot (@typescript-bot) perf test this |
|
Jake Bailey (@jakebailey) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
lspComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
startupComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for contributing to the TypeScript native port! Development has moved from this repository back to the main microsoft/TypeScript repository. GitHub does not have PR transfer functionality, so we're closing this PR here. If this change is still relevant, please reopen it as a new pull request in See microsoft/typescript-go#4918 for more information about the move. |
WIP