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

Fetch claims to define ReadableStream, but Streams is the actual location #780

Closed
tabatkins opened this issue Jul 27, 2018 · 5 comments · Fixed by #1044
Closed

Fetch claims to define ReadableStream, but Streams is the actual location #780

tabatkins opened this issue Jul 27, 2018 · 5 comments · Fixed by #1044
Labels
clarification Standard could be clearer topic: streams

Comments

@tabatkins
Copy link
Contributor

Currently Fetch has a definition for ReadableStream, despite Streams having the actual definition. I suspect this predates use of Bikeshed, as it immediately has a biblio reference to Streams, and the "have a local definition but biblio-link to the real dfn's spec" was a common practice in The Bygone Days.

Can we remove this definition, or at least mark it as "local only" by giving it lt="" local-lt="ReadableStream"?

@ricea
Copy link
Collaborator

ricea commented Jul 30, 2018

The Service Worker standard uses this definition of ReadableStream here: https://w3c.github.io/ServiceWorker/#cache-put (step 8.1). I think it could probably be migrated to use the streams standard for this one, although it still needs other stream-related definitions from the fetch standard.

@jakearchibald
Copy link
Collaborator

jakearchibald commented Jul 30, 2018 via email

@annevk
Copy link
Member

annevk commented Jul 31, 2018

I thought Streams defined the JavaScript class, whereas Fetch defines the IDL "wrapper"? You can contrast this with JavaScript defining the Uint8Array class and IDL defining the IDL "wrapper" for it.

@tabatkins
Copy link
Contributor Author

The problem here is that Bikeshed doesn't recognize the notion of a JS class definition distinct from an IDL definition; in other words, I don't have definition types for JS itself. But Streams is using the IDL dfn types, so they're colliding here.

Ultimately tho, I don't understand why Streams wants to define the JS and not the IDL. It has its own reasons for wanting to provide an actual pure-JS dfn, and that's fine, but not having the IDL either just seems weird, given that every spec that wants to interact with it is going to do so via IDL. Weird for another spec to define the IDL (and do so purely in prose, too, rather than with an IDL block...).

@ricea
Copy link
Collaborator

ricea commented Aug 1, 2018

See whatwg/streams#45 for the long discussion of Streams vs. IDL.

and do so purely in prose, too, rather than with an IDL block...

It's worth noting that the WebIDL standard itself doesn't use IDL blocks to describe JS types.

domenic added a commit that referenced this issue Jun 26, 2020
domenic added a commit that referenced this issue Jun 26, 2020
annevk pushed a commit that referenced this issue Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer topic: streams
Development

Successfully merging a pull request may close this issue.

4 participants