angular-docs-cn/packages/language-service/ivy/test
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
..
BUILD.bazel feat(language-service): introduce hybrid visitor to locate AST node (#38540) 2020-08-24 09:24:18 -07:00
compiler_factory_spec.ts fix(language-service): [Ivy] create compiler only when program changes (#39231) 2020-10-14 14:10:37 -07:00
definitions_spec.ts refactor(language-service): Allow "go to definition" for directives in Ivy (#39228) 2020-10-13 08:52:29 -07:00
diagnostic_spec.ts feat(language-service): [Ivy] getSemanticDiagnostics for external templates (#39065) 2020-10-08 08:45:54 -07:00
hybrid_visitor_spec.ts test(language-service): test ICU expressions in hybrid visitor (#39072) 2020-10-08 11:55:27 -07:00
language_service_adapter_spec.ts fix(language-service): [Ivy] create compiler only when program changes (#39231) 2020-10-14 14:10:37 -07:00
language_service_spec.ts fix(language-service): [Ivy] create compiler only when program changes (#39231) 2020-10-14 14:10:37 -07:00
mock_host.ts fix(language-service): [Ivy] create compiler only when program changes (#39231) 2020-10-14 14:10:37 -07:00
mock_host_spec.ts test(language-service): [Ivy] return cursor position in overwritten template (#38552) 2020-08-24 09:25:04 -07:00
quick_info_spec.ts feat(language-service): Add getTypeDefinitionAtPosition (go to type definition) (#39145) 2020-10-09 10:57:37 -07:00
test_utils.ts feat(language-service): Add getTypeDefinitionAtPosition (go to type definition) (#39145) 2020-10-09 10:57:37 -07:00
type_definitions_spec.ts feat(language-service): Add getTypeDefinitionAtPosition (go to type definition) (#39145) 2020-10-09 10:57:37 -07:00