angular-cn/packages/language-service/ivy
Keen Yee Liau 8f1317f06f fix(language-service): [Ivy] create compiler only when program changes (#39231)
This commit fixes a bug in which a new Ivy Compiler is created every time
language service receives a new request. This is not needed if the
`ts.Program` has not changed.

A new class `CompilerFactory` is created to manage Compiler lifecycle and
keep track of template changes so that it knows when to override them.
With this change, we no longer need the method `getModifiedResourceFile()`
on the adapter. Instead, we call `overrideComponentTemplate` on the
template type checker.

This commit also changes the incremental build strategy from
`PatchedIncrementalBuildStrategy` to `TrackedIncrementalBuildStrategy`.

PR Close #39231
2020-10-14 14:10:37 -07:00
..
test fix(language-service): [Ivy] create compiler only when program changes (#39231) 2020-10-14 14:10:37 -07:00
BUILD.bazel refactor(compiler-cli): implement `DeclarationNode` node type (#38959) 2020-10-12 08:32:46 -07:00
compiler_factory.ts fix(language-service): [Ivy] create compiler only when program changes (#39231) 2020-10-14 14:10:37 -07:00
definitions.ts refactor(language-service): Allow "go to definition" for directives in Ivy (#39228) 2020-10-13 08:52:29 -07:00
hybrid_visitor.ts fix(language-service): [Ivy] hybrid visitor should not locate let keyword (#39061) 2020-10-06 11:33:32 -07:00
language_service.ts fix(language-service): [Ivy] create compiler only when program changes (#39231) 2020-10-14 14:10:37 -07:00
language_service_adapter.ts fix(language-service): [Ivy] create compiler only when program changes (#39231) 2020-10-14 14:10:37 -07:00
quick_info.ts feat(language-service): Add getTypeDefinitionAtPosition (go to type definition) (#39145) 2020-10-09 10:57:37 -07:00
ts_plugin.ts feat(language-service): Add getTypeDefinitionAtPosition (go to type definition) (#39145) 2020-10-09 10:57:37 -07:00
utils.ts refactor(compiler-cli): implement `DeclarationNode` node type (#38959) 2020-10-12 08:32:46 -07:00