Skip to content

Automatically generate protocol.d.ts by pulling in necessary dependencies #11550

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

Merged
merged 6 commits into from
Oct 12, 2016

Conversation

vladima
Copy link
Contributor

@vladima vladima commented Oct 12, 2016

As a result protocol.d.ts can be compiled as a standalone file (modulo lib.d.ts)
Also in this PR

  • added a few missing request/response types
  • assign string literal command types to requests
  • hide VS specific command that should not be part of the protocol
  • hide position argument on FileLocationRequest - we'll do work to properly split messages to line/offset-based and position-based later

Example of generated protocol.d.ts: https://gist.github.com/vladima/411ec6893d4e07a08c4804afbf0d754a

pending work: reflect changes made in Jakefile.js in gulp script
fixes: #11520, #11519, #11518, #11516, #11515, #11514. #11482, #11487

// CC: @mhegazy, @dbaeumer

@dbaeumer
Copy link
Member

Looked at https://gist.github.com/vladima/411ec6893d4e07a08c4804afbf0d754a. Looks very nice.

@dbaeumer
Copy link
Member

One minor comment: this is actually breaking names:

EditorOptions -> EditorSettings
FormatOptions -> FormatCodeSettings

OK with me but you might want to doc this.

@@ -1077,11 +1220,10 @@ declare namespace ts.server.protocol {
* End position of the range for which to format text in file.
*/
endPosition?: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be internal too


file(buildProtocolTs);

compileFile(buildProtocolJs,
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to add the new file to the LKG list

@vladima vladima merged commit 81fc759 into release-2.0.5 Oct 12, 2016
@vladima vladima deleted the vladima/generate-protocol branch October 12, 2016 18:02
vladima added a commit that referenced this pull request Oct 12, 2016
Automatically generate protocol.d.ts by pulling in necessary dependencies
vladima added a commit that referenced this pull request Oct 12, 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.

4 participants