Skip to content
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

fix(lsp): include mtime in tsc script version #20911

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

nayeemrmn
Copy link
Collaborator

Fixes #10897. The LSP client will reset the version index to 1 if the file is deleted, which prevented tsc from refreshing diagnostics. This includes the Document::fs_version() (mtime) in the version that we pass to tsc.

In theory this shouldn't solve the issue for the duration where the new file is still unsaved, because there's no mtime to apply. But it seems no diagnostics are published or shown for unsaved files anyway so I can't reproduce an issue.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM!

@nayeemrmn nayeemrmn merged commit 7561f6e into denoland:main Oct 17, 2023
13 checks passed
@nayeemrmn nayeemrmn deleted the lsp-tsc-script-version-mtime branch October 18, 2023 14:31
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.

lsp: errors on re-creation of already tracked file
2 participants