Skip to content

Fix issue of program not being reused when host implements getSourceFileByPath #27483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 1, 2018

Conversation

sheetalkamat
Copy link
Member

This was because redirect file didn't set resolvedPath which then would pick from redirected file. So when getting source file, instead of getting if for undirected path, we would end up getting source file for redirected file and then comparing wrong files together.
Fixes #27207

@sheetalkamat sheetalkamat requested review from a user, weswigham and RyanCavanaugh and removed request for a user October 1, 2018 18:54
fileExists: fileName => files.has(fileName),
readFile: fileName => {
const file = files.get(fileName);
return file && file.text;
},
};
if (useGetSourceFileByPath) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well calculate filesByPath inside the if.

@sheetalkamat sheetalkamat merged commit d2647a1 into master Oct 1, 2018
@sheetalkamat sheetalkamat deleted the redirects branch October 1, 2018 19:47
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.

TS3.0 conditional slow performance with rollup: no program reuse with "redirect" source files
1 participant