Skip to content

fix(compiler): make sure LanguageService updated with test file information before getting diagnostics for test file#1507

Merged
ahnpnl merged 3 commits intokulshekhar:masterfrom
ahnpnl:fix-compiler
Apr 7, 2020
Merged

fix(compiler): make sure LanguageService updated with test file information before getting diagnostics for test file#1507
ahnpnl merged 3 commits intokulshekhar:masterfrom
ahnpnl:fix-compiler

Conversation

@ahnpnl
Copy link
Copy Markdown
Collaborator

@ahnpnl ahnpnl commented Apr 6, 2020

Summary

In #1483, we introduced caching imported modules for test files and use that cache to do type checking for test files once one of the imported modules' contents changes.

However, this causes a bug that when running tests with cache and one of the imported modules' contents changes, language service sometimes doesn't have the information of the test file to do type checking which then throws error Cannot find source file .....

close #1506
close #1523

Test plan

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

N.A.

@ahnpnl ahnpnl requested a review from kulshekhar as a code owner April 6, 2020 21:47
@ahnpnl ahnpnl changed the title fix(compiler): make sure language service updated with test file information before getting diagnostics for test file fix(compiler): make sure LanguageService updated with test file information before getting diagnostics for test file Apr 6, 2020
@ahnpnl ahnpnl merged commit 311eaeb into kulshekhar:master Apr 7, 2020
@ahnpnl ahnpnl deleted the fix-compiler branch April 7, 2020 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

type script reference path is not getting resolved in jest ts-jest 26.1.2 - "cannot find source file"

2 participants