angular-cn/packages/language-service/ivy/test
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
..
legacy refactor(compiler-cli): provide a host to readConfiguration (#39619) 2020-11-17 14:45:09 -08:00
BUILD.bazel test(language-service): introduce new virtual testing environment (#39594) 2020-11-17 11:59:56 -08:00
env.ts test(language-service): introduce new virtual testing environment (#39594) 2020-11-17 11:59:56 -08:00
mock_host.ts test(language-service): introduce new virtual testing environment (#39594) 2020-11-17 11:59:56 -08:00
quick_info_spec.ts test(language-service): introduce new virtual testing environment (#39594) 2020-11-17 11:59:56 -08:00