Skip to content

Reuse ModuleResolutionCache when updating Program #608

@ajafff

Description

@ajafff

Similar to microsoft/TypeScript#31100

In order to correctly implement CompilerHost.resolveModuleNames (and resolveTypeReferenceDirectives) we need to create a new instance of ProjectHost for each Program (or at least ProjectHost needs to know the CompilerOptions of the currently created/updated Program).
The cache needs to be reset if the CompilerOptions change (or for the next Program).

The linter cache #370 might benefit from this change as it needs to resolve everything as well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions