ivogabe / gulp-typescript

A TypeScript compiler for gulp with incremental compilation support.
MIT License
831 stars 129 forks source link

Fix: TypeScript 3.1.1+ requires that a compiler host implement `readDirectory` if `projectReferences` are used. #600

Closed DataTables closed 5 years ago

DataTables commented 5 years ago

See https://github.com/Microsoft/TypeScript/pull/26851 for details on that change in TypeScript

Without this change, gulp-typescript that is compiling a project that uses projectReferences would throw an error:

"Error: Debug Failure. 'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"

The fix is to use the readDirectory method from the TypeScript provided compiler host, similar to what is already done for realpath, getDirectories and directoryExists.

ivogabe commented 5 years ago

Sorry for the late reply. #595 seems to have a similar fix, which I just merged. So I'll close this one, as the fix is already merged elsewhere.