Skip to content

Add support for suppressing project events - #22590

Merged
Andrew Casey (amcasey) merged 2 commits into
microsoft:masterfrom
amcasey:DiagEvents
Mar 23, 2018
Merged

Andrew Casey (amcasey) merged 2 commits into
microsoft:masterfrom
amcasey:DiagEvents

Conversation

@amcasey

@amcasey Andrew Casey (amcasey) commented Mar 15, 2018 •

Copy link
Copy Markdown
Member

VS doesn't consume (e.g.) syntaxDiag events, so there's no reason to do the work to compute their payloads.

@amcasey

Copy link
Copy Markdown
Member Author

VS appears to have begun to receive these events as of #19864.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add test as well.

Comment thread src/server/server.ts Outdated
hrtime: process.hrtime,
logger,
canUseEvents,
suppressProjectEvents,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Feels like this should be flags that indicates event to suppress given that this does not suppress ProjectInfoTelemetryEvent which is project event

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.

In the interest of keeping the name intelligible, I decided not to incorporate that. They also don't seem conceptually related to projects.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

then may be rename it to onlyTelemetryEvent or something as such?

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's not only telemetry. We also want TypingsInstaller events.

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.

We could call it suppressDiagnosticEvents, but then I'd feel obliged to let ProjectsUpdatedInBackgroundEvent through (which is fine, it just requires a different implementation).

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.

Changed to suppressDiagnosticEvents.

@amcasey

Copy link
Copy Markdown
Member Author

Note that only versions of VS patched to pass this additional flag will benefit from the change.

@sheetalkamat

Copy link
Copy Markdown
Member

Please add test to verify this functionality

@amcasey

Copy link
Copy Markdown
Member Author

Sheetal Nandi (@sheetalkamat) Better?

@amcasey

Copy link
Copy Markdown
Member Author

Apparently, it is unwise to use GH's merge tool. I'll redo it locally.

VS doesn't consume (e.g.) `syntaxDiag` events, so there's no reason to
do the work to compute their payloads.
@amcasey
Andrew Casey (amcasey) merged commit 6524fc5 into microsoft:master Mar 23, 2018
@amcasey
Andrew Casey (amcasey) deleted the DiagEvents branch March 23, 2018 00:50
@microsoft 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