Skip to content

Reload the text from file if there is pending reload of the script info before determining to use SVC#22151

Merged
sheetalkamat merged 2 commits into
masterfrom
svcOfPendingReloadFile
Mar 3, 2018
Merged

Reload the text from file if there is pending reload of the script info before determining to use SVC#22151
sheetalkamat merged 2 commits into
masterfrom
svcOfPendingReloadFile

Conversation

@sheetalkamat
Copy link
Copy Markdown
Member

Fixes #20806

@sheetalkamat sheetalkamat merged commit cbef5c2 into master Mar 3, 2018
@sheetalkamat sheetalkamat deleted the svcOfPendingReloadFile branch March 3, 2018 03:11
Comment thread src/server/scriptInfo.ts
// Else if the svc is uptodate with the text, we are good
return !this.pendingReloadFromDisk && this.svc;
// If there is pending reload from the disk then, reload the text
if (this.pendingReloadFromDisk) {
Copy link
Copy Markdown
Contributor

@aozgaa aozgaa Mar 6, 2018

Choose a reason for hiding this comment

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

Should this.pendingReloadFromDisk be set to false here or in a callee after the reload completes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It does get set whenever the text is reloaded into the script info. (https://github.com/Microsoft/TypeScript/pull/22151/files#diff-f56eebffea5b0d2286bb5998c67920e9L78)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missed that. Thanks!

@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants