Skip to content

Add refreshDiagnostics() method to Project#23824

Merged
2 commits merged into
masterfrom
plugin_projectService
May 7, 2018
Merged

Add refreshDiagnostics() method to Project#23824
2 commits merged into
masterfrom
plugin_projectService

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented May 2, 2018

Fixes #15914 and #15915

Using this, a plugin should be able to call sendProjectsUpdatedInBackgroundEvent on the ProjectService when it notices a config file has changed. Then we should request diagnostics again.
(Note: this includes having the plugin watch tsconfig.json if it needs to, instead of having the server notify the plugin for that.)
CC @egamma

@ghost ghost requested review from mhegazy and sheetalkamat May 2, 2018 18:02
Copy link
Copy Markdown
Member

@sheetalkamat sheetalkamat left a comment

Choose a reason for hiding this comment

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

I do not think we should be exposing ProjectService here. The change in tsconfig file is project scoped not whole service dependent. The sendProjectsUpdatedInBackgroundEvent is event to session to inform about the changes in various projects and it shouldnt be used for this purpose.

@ghost
Copy link
Copy Markdown
Author

ghost commented May 2, 2018

Maybe we could add a method on project for use by plugins, that would cause diagnostics to be re-requested on the project?

@ghost ghost force-pushed the plugin_projectService branch from 387b854 to 4614719 Compare May 2, 2018 22:30
@ghost
Copy link
Copy Markdown
Author

ghost commented May 7, 2018

Awaiting @mhegazy to approve just to be sure

@ghost ghost changed the title Expose ProjectService to plugins Add refreshDiagnostics() method to Project May 7, 2018
@ghost ghost merged commit 05b2506 into master May 7, 2018
@ghost ghost deleted the plugin_projectService branch May 7, 2018 19:38
@egamma
Copy link
Copy Markdown
Member

egamma commented May 8, 2018

@Andy-MS @mhegazy thanks! I´ll do another push on the tslint plugin for TS 2.9.

@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
This pull request was closed.
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