perf(compiler-cli): ensure module resolution cache is reused for type-check program by JoostK · Pull Request #39693 · angular/angular
added
refactoring
labels
Nov 14, 2020
JoostK
marked this pull request as ready for review
JoostK
added
the
action: review
label
Nov 14, 2020…-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.
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, 2021This was referenced
Mar 15, 2021This 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