angular-docs-cn/packages/language-service/ivy
Alex Rickabaugh 028e4f7f6d fix(language-service): force compileNonExportedClasses: false in LS (#40092)
Projects opened in the LS are often larger in scope than the compilation
units seen by the compiler when actually building. For example, in the LS
it's not uncommon for the project to include both application as well as
test files. This can create issues when the combination of files results
in errors that are not otherwise present - for example, if test files
have inline NgModules that re-declare components (a common Angular pattern).
Such code is valid when compiling the app only (test files are excluded, so
only one declaration is seen by the compiler) or when compiling tests only
(since tests run in JIT mode and are not seen by the AOT compiler), but when
both sets of files are mixed into a single compilation unit, the compiler
sees the double declaration as an error.

This commit attempts to mitigate the problem by forcing the compiler flag
`compileNonExportedClasses` to `false` in a LS context. When tests contain
duplicate declarations, often such declarations are inline in specs and not
exported from the top level, so this flag can be used to greatly improve the
IDE experience.

PR Close #40092
2020-12-14 10:09:21 -08:00
..
test fix(language-service): force compileNonExportedClasses: false in LS (#40092) 2020-12-14 10:09:21 -08:00
BUILD.bazel refactor(compiler-cli): provide a host to readConfiguration (#39619) 2020-11-17 14:45:09 -08:00
adapters.ts refactor(language-service): language_service_adapter -> adapters (#39619) 2020-11-17 14:45:09 -08:00
compiler_factory.ts fix(compiler-cli): track poisoned scopes with a flag (#39923) 2020-12-03 13:42:13 -08:00
completions.ts feat(language-service): autocompletion within expression contexts (#39727) 2020-12-10 11:09:53 -08:00
definitions.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00
display_parts.ts refactor(compiler-cli): Add additional shim locations to reference and variable symbols (#39715) 2020-11-19 12:15:21 -08:00
language_service.ts fix(language-service): force compileNonExportedClasses: false in LS (#40092) 2020-12-14 10:09:21 -08:00
quick_info.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00
references.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00
template_target.ts fix(language-service): Prevent matching nodes after finding a keySpan (#40047) 2020-12-10 13:44:18 -08:00
ts_plugin.ts feat(language-service): implement autocompletion for global properties (Ivy) (#39250) 2020-12-04 10:19:45 -08:00
ts_utils.ts refactor(language-service): Use compiler APIs in Ivy to get definitions for external resources (#39476) 2020-11-06 09:17:33 -08:00
utils.ts feat(language-service): Add "find references" capability to Ivy integrated LS (#39768) 2020-12-02 12:54:21 -08:00