Repository navigation
Invalidate declaration state when linked packages change - #64841
Open
Adarsh (jackeddisciple) wants to merge 1 commit into
Open
Adarsh (jackeddisciple) wants to merge 1 commit into
Adarsh (jackeddisciple) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
Author
|
@microsoft-github-policy-service agree |
This branch has not been deployed
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.
Fixes #64838
Incremental builds kept old declaration diagnostics and skipped d.ts emit for unchanged files even when the package links behind declaration module specifiers had changed, so
tsc -bcould disagree withtsc -b --force.The snapshot now stores a signature of the program's symlinked package directories plus each linked package's entry fields (
type,main,types,typings,typesVersions,exports), written to tsbuildinfo with paths relative to it. When the signature changes, every file gets its declaration emit queued again, the same way an emit affecting option change does. Dependency names show up through the links they resolve, and edits like a version bump leave the signature alone, so they don't trigger another emit. Unchanged d.ts text still skips the write, so downstream projects don't churn.JSONValuegets aMarshalJSONTosoexportsandtypesVersionscan be serialized for the signature.Tests cover adding and removing a linked dependency, declaring a dependency on an existing link, and a linked package's
typesentry moving undertsc -b, plustsc --incrementaland watch. Three existing baselines just pick up the new tsbuildinfo field.Not covered here: with
--build, a link change with no manifest edit still doesn't mark the project out of date. That's the existing up to date check, which misses link only changes for module resolution too, so it seemed better as a separate change.I used Claude Code while working on this and reviewed the changes.