You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a bug or what. But if I hook into the CompilerHost's getSourceFile function, it never reuses a pre-existing SourceFile. It always returns new ones. This implementation of getSourceFile is provided by ts.createIncrementalCompilerHost.
Are we meant to wrap the CompilerHost to implement caching ourselves? Does TypeScript do this sort of wrapping internally?
I've definitely looked at those parts of the TS codebase before, but I forget, so I'll need to look again.
LanguageService does this automatically via DocumentRegistry. The CompilerHost APIs don't have a way to pass in a DocumentRegistry.
The text was updated successfully, but these errors were encountered:
I'm not sure if this is a bug or what. But if I hook into the
CompilerHost
'sgetSourceFile
function, it never reuses a pre-existing SourceFile. It always returns new ones. This implementation ofgetSourceFile
is provided byts.createIncrementalCompilerHost
.Are we meant to wrap the
CompilerHost
to implement caching ourselves? Does TypeScript do this sort of wrapping internally?I've definitely looked at those parts of the TS codebase before, but I forget, so I'll need to look again.
LanguageService does this automatically via
DocumentRegistry
. TheCompilerHost
APIs don't have a way to pass in aDocumentRegistry
.The text was updated successfully, but these errors were encountered: