angular-cn/packages/language-service/ivy
ayazhafiz 64c3135be7 refactor(compiler-cli): provide a host to readConfiguration (#39619)
Currently `readConfiguration` relies on the file system to perform disk
utilities needed to read determine a project configuration file and read
it. This poses a challenge for the language service, which would like to
use `readConfiguration` to watch and read configurations dependent on
extended tsconfigs (#39134). Challenges are at least twofold:

1. To test this, the langauge service would need to provide to the
   compiler a mock file system.
2. The language service uses file system utilities primarily through
   TypeScript's `Project` abstraction. In general this should correspond
   to the underlying file system, but it may differ and it is better to
   go through one channel when possible.

This patch alleviates the concern by directly providing to the compiler
a "ParseConfigurationHost" with read-only "file system"-like utilties.
For the language service, this host is derived from the project owned by
the language service.

For more discussion see
https://docs.google.com/document/d/1TrbT-m7bqyYZICmZYHjnJ7NG9Vzt5Rd967h43Qx8jw0/edit?usp=sharing

PR Close #39619
2020-11-17 14:45:09 -08:00
..
test refactor(compiler-cli): provide a host to readConfiguration (#39619) 2020-11-17 14:45:09 -08:00
BUILD.bazel refactor(compiler-cli): provide a host to readConfiguration (#39619) 2020-11-17 14:45:09 -08:00
compiler_factory.ts test(language-service): introduce new virtual testing environment (#39594) 2020-11-17 11:59:56 -08:00
definitions.ts refactor(language-service): Use compiler APIs in Ivy to get definitions for external resources (#39476) 2020-11-06 09:17:33 -08:00
display_parts.ts refactor(language-service): introduce DisplayParts abstraction for Ivy (#39505) 2020-11-02 10:29:50 -08:00
language_service.ts refactor(compiler-cli): provide a host to readConfiguration (#39619) 2020-11-17 14:45:09 -08:00
language_service_adapter.ts refactor(compiler-cli): provide a host to readConfiguration (#39619) 2020-11-17 14:45:09 -08:00
quick_info.ts refactor(language-service): refactor `HybridVisitor` and expand its capabilities (#39505) 2020-11-02 10:29:50 -08:00
template_target.ts refactor(language-service): refactor `HybridVisitor` and expand its capabilities (#39505) 2020-11-02 10:29:50 -08:00
ts_plugin.ts feat(language-service): Add getTypeDefinitionAtPosition (go to type definition) (#39145) 2020-10-09 10:57:37 -07: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 refactor(language-service): Use compiler APIs in Ivy to get definitions for external resources (#39476) 2020-11-06 09:17:33 -08:00