Skip to content

Fix the build protocol script#33691

Closed
RyanCavanaugh wants to merge 1 commit intomicrosoft:masterfrom
RyanCavanaugh:fixBuildScript
Closed

Fix the build protocol script#33691
RyanCavanaugh wants to merge 1 commit intomicrosoft:masterfrom
RyanCavanaugh:fixBuildScript

Conversation

@RyanCavanaugh
Copy link
Copy Markdown
Member

any strikes again. Fixes a crash in the protocol builder script introduced by the recursive type PR

Comment thread scripts/buildProtocol.ts
if (s.name === "Array" || s.name === "ReadOnlyArray") {
// we should process type argument instead
return this.processType((<any>type).typeArguments[0]);
const typeArgs = this.typeChecker.getTypeArguments(type as ts.TypeReference);
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.

Ideally we'd probably also check if type.flags & ts.TypeFlags.TypeReference just to be sure, but I don't think we'll do something stupid like enum Array {} anywhere, so it's likely safe to assume it's a TypeReference.

@weswigham
Copy link
Copy Markdown
Member

For the record: this can only be merged into master with the next LKG (and in fact is needed to make the next LKG pass). This is because of the breaking change to our own API, which our own build depends on. XD

@sandersn
Copy link
Copy Markdown
Member

sandersn commented Feb 5, 2020

@weswigham your previous comment about when to merge this PR is now really old. Is it safe to merge now?

(and in fact is needed to make the next LKG pass)

This, uh, makes me think that this should already have been merged.

@weswigham
Copy link
Copy Markdown
Member

We no longer need it because we removed the API break in the services layer by keeping a getter for type arguments around.

@sandersn
Copy link
Copy Markdown
Member

sandersn commented Feb 5, 2020

huzzah!

@sandersn sandersn closed this Feb 5, 2020
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants