-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Initialize the map for dts to reference and source to reference when parsing project reference as its always needed #61746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d817e52
to
7d2de4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the project reference redirection logic to improve load performance for projects with many references by renaming and consolidating the redirection APIs. Key changes include:
- Renaming functions from getProjectReferenceRedirect/getResolvedProjectReferenceToRedirect to getRedirectFromSourceFile (and introducing getRedirectFromOutput).
- Updating types, mapping variables, and function calls across multiple modules (compiler, server, services) to support the new redirection mechanism.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/services/utilities.ts | Renames function call to use getRedirectFromSourceFile instead of the legacy API. |
src/server/project.ts | Updates class methods to use the new redirection API. |
src/compiler/utilities.ts | Adjusts function calls and callback signatures to align with the new API. |
src/compiler/types.ts | Updates type declarations to match the new redirection functions. |
src/compiler/resolutionCache.ts | Replaces old redirect function calls with getRedirectFromSourceFile. |
src/compiler/program.ts | Refactors multiple redirection-related operations, mapping setups, and error handling to use the new API. |
src/compiler/moduleSpecifiers.ts | Updates module specifier redirection calls to use outputDts from getRedirectFromSourceFile. |
src/compiler/checker.ts | Adjusts redirection logic in error messaging to reference outputDts through the new API. |
src/compiler/builderState.ts | Replaces legacy project reference redirect usage with getRedirectFromSourceFile for file path resolution. |
7d2de4c
to
88a3ff3
Compare
@typescript-bot pack this |
88a3ff3
to
b3cb7db
Compare
@typescript-bot pack this |
Hey @sheetalkamat, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build and an npm module you can use via |
:( |
' |
…parsing project reference as its always needed
b3cb7db
to
a0d28b9
Compare
The time to update project graph went from
268881.891ms
to36340.1192ms
to