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

send begin/end notifications when installing types packages #12551

Merged
merged 1 commit into from
Nov 29, 2016

Conversation

vladima
Copy link
Contributor

@vladima vladima commented Nov 29, 2016

fixes #12540

// cc @mhegazy

open question: do we assume that existing consumers of tsserver will ignore new event or should we allow new events under the command line flag

}

export interface InstallTypesEventBody {
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

missing typingsInstallerVersion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this event should be consumed only by editor so this information is unnecessary.

if (!this.eventSender) {
return;
}
if (this.telemetryEnabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we still need TypingsInstalledTelemetryEvent*?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reasoning behind this was: these events are semantically different. one is intended to be consumed only in the editor, another - send by VSCode on our behalf. In theory the latter one can be sent by just grabbing the payload and sending it as is treating its content as opaque. Yes, in this case VSCode can reconstruct telemetry event from the content of End notification, however I'd prefer to keep them separate for simplify consumption. // cc @mjbvz for his opinion

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think that keeping both makes sense since they are used for different purposes.

Copy link
Contributor

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

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

Thanks for the quick followup here. The new event api looks good to me. Once this is merged in, please just let me know when it be be available.

@vladima vladima merged commit 1418fd1 into master Nov 29, 2016
@vladima vladima deleted the vladima/12540 branch November 29, 2016 18:14
@mhegazy mhegazy mentioned this pull request Nov 30, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

[TS Server] Add Automatic Typings Acquisition Begin and End Notifications
4 participants