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
Enabling more Stream functionality #2584
Conversation
@@ -1237,6 +1243,7 @@ TouchInit = [] | |||
TouchList = [] | |||
TrackEvent = ["Event"] | |||
TrackEventInit = [] | |||
TransformStream = ["ReadableStream", "WritableStream"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TransformStream is useless without these.
let _ = r; | ||
self | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type isn't created by the API user. It would benefit from #1793 and the setters are not useful.
let _ = r; | ||
self | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, not constructed by user, needs getters not setters.
31042e7
to
3592b83
Compare
Seems reasonable to me! I don't know anything about these APIs myself so I'd basically just be trusting you about the stable/unstable. Was there anything else you wanted to do here before merging though? |
@alexcrichton I've had a hard time determining how stable they are. The spec is a living standard and I've been relying on MDN to know if they're 'experimental' or not. After reviewing them again, I'll move them all to unstable as MDN lists the methods of |
d5c12fa
to
5119a7b
Compare
This is useful when compiling to WASM for the Cloudflare Workers: https://developers.cloudflare.com/workers/runtime-apis/streams Added Unstable WebIDL: unstable/ReadableStreamDefaultReader.webidl unstable/ReadableStreamGenericReader.webidl unstable/QueuingStrategy.webidl unstable/ReadableStreamBYOBReader.webidl unstable/TransformStream.webidl unstable/WritableStream.webidl unstable/WritableStreamDefaultWriter.webidl
5119a7b
to
5a5f8f5
Compare
I believe this is in a good state for merging now. |
This is unfortunately a breaking change to the |
If a return type is not know to the code generator, it'll return a If the return type is unstable we could mark the function as unstable, but that could then take a stable function that had unknown return types and make it unstable. That seems undesirable. In this case we're lucky that there are 2 return types possible and the code generator end up resolving to |
Ok seems reasonable to me! This defintely seems like a bug in the code generator though... |
This PR is rebased it off of the PR #2586 so that it's easier to see what that PR does.
This is useful when compiling to WASM for the Cloudflare Workers:
https://developers.cloudflare.com/workers/runtime-apis/streams
Added Unstable WebIDL:
unstable/ReadableStreamDefaultReader.webidl
unstable/ReadableStreamGenericReader.webidl
unstable/QueuingStrategy.webidl
unstable/ReadableStreamBYOBReader.webidl
unstable/TransformStream.webidl
unstable/WritableStream.webidl
unstable/WritableStreamDefaultWriter.webidl