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

update all opened document diagnostics on save #237

Merged
merged 3 commits into from
Jun 29, 2020

Conversation

jasonlyu123
Copy link
Member

related to #177

update the diagnostics of all opened svelte files when a svelte file or js file is saved to disk. Mainly for typescript type errors.

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

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

If I understand correctly you want to track what is really opened in the IDE and not what was opened by for example the ts language service as part of resolving file references. If yes, I would refactor it so that this is more explicit, so that in connection.onDidOpenTextDocument there is a docManager.markAsOpenedInClient(evt.textDocument.uri) and in connection.onDidCloseTextDocument add docManager.markAsClosedInClient(evt.textDocument.uri). Inside DocumentManager this is tracked as a set of openedDocsInClient, which the DiagnosticsManager uses.

Apart from that it looks good 👍

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

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

👍

@dummdidumm dummdidumm merged commit 7a44443 into sveltejs:master Jun 29, 2020
@jasonlyu123 jasonlyu123 deleted the update-all-diagnostics branch November 13, 2020 05:00
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.

2 participants