perf(compiler-cli): ensure module resolution cache is reused for type-check program#39693
Closed
JoostK wants to merge 1 commit intoangular:masterfrom
Closed
perf(compiler-cli): ensure module resolution cache is reused for type-check program#39693JoostK wants to merge 1 commit intoangular:masterfrom
JoostK wants to merge 1 commit intoangular:masterfrom
Conversation
alxhub
approved these changes
Mar 8, 2021
…-check program The Angular compiler creates two `ts.Program`s; one for emit and one for template type-checking. The creation of the type-check program could benefit from reusing the `ts.ModuleResolutionCache` that was primed during the creation of the emit program. This requires that the compiler host implements `resolveModuleNames`, as otherwise TypeScript will setup a `ts.ModuleResolutionHost` of its own for both programs. This commit ensures that `resolveModuleNames` is always implemented, even if the originally provided compiler host does not. This is beneficial for the `ngc` binary.
d2b3254 to
d6be996
Compare
Contributor
AndrewKushnir
pushed a commit
that referenced
this pull request
Mar 9, 2021
…-check program (#39693) The Angular compiler creates two `ts.Program`s; one for emit and one for template type-checking. The creation of the type-check program could benefit from reusing the `ts.ModuleResolutionCache` that was primed during the creation of the emit program. This requires that the compiler host implements `resolveModuleNames`, as otherwise TypeScript will setup a `ts.ModuleResolutionHost` of its own for both programs. This commit ensures that `resolveModuleNames` is always implemented, even if the originally provided compiler host does not. This is beneficial for the `ngc` binary. PR Close #39693
This was referenced Mar 10, 2021
Merged
This was referenced Mar 15, 2021
Closed
Closed
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The Angular compiler creates two
ts.Programs; one for emit and one fortemplate type-checking. The creation of the type-check program could
benefit from reusing the
ts.ModuleResolutionCachethat was primedduring the creation of the emit program. This requires that the compiler
host implements
resolveModuleNames, as otherwise TypeScript will setupa
ts.ModuleResolutionHostof its own for both programs.This commit ensures that
resolveModuleNamesis always implemented,even if the originally provided compiler host does not. This is
beneficial for the
ngcbinary.