-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Map streams tests to web-features #49829
Open
MattiasBuelens
wants to merge
1
commit into
web-platform-tests:master
Choose a base branch
from
MattiasBuelens:web-features/streams
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
features: | ||
- name: streams | ||
files: "**" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
features: | ||
- name: streams | ||
files: "**" | ||
- name: async-iterable-streams | ||
files: | ||
- async-iterator.any.js | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
async-iterator.any.js will be under both streams and async-iterable-streams. Is that intentional?
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.
Yes, that's intentional. Async iterable streams is a subfeature of streams.
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.
Thanks for responding.
I'm asking this because the way we organize features in the web-features repository is a bit different from how they might be conceptually related. While async iterable streams are a sub-feature of streams in general, we treat all features as top-level. We then use groups to categorize related features. (This can be a little confusing since some features have the same name as their group.)
It's important to remember that the
wpt
repository doesn't recognize these groups. This means we need to explicitly tag each test with the specific feature name it belongs to. We also need to avoid including tests that belong to multiple features within the same group. (Otherwise, this is a new pattern we can discuss in step 3 below).Here are some examples of how we've handled this in the past:
grid
andsubgrid
: Subgrid is clearly a sub-feature of grid. However, because theweb-features
repository doesn't have a hierarchy for sub-features, we keep thesubgrid
tests separate from thegrid
tests. (Both are mapped to a group namedgrid
.) You can see this in thewpt
repository: grid and subgrid. You can see the tests that are mapped to grid vs subgrid.custom-elements
group: This group contains features likeautonomous-custom-elements
andcustomized-built-in-elements
. While not a parent-child relationship, this example illustrates how we use the!
exclusion pattern in the file to ensure tests are only associated with one feature.By including
async-iterator.any.js
instreams
, you're implying that the completeness score for thestreams
web feature (which includes these APIs) depends on assertions inasync-iterator.any.js
. However, I suspectasync-iterator.any.js
only tests the APIs defined in theasync-iterable-streams
feature (see the API list here).To ensure we're mapping these tests correctly, I propose the following steps:
async-iterator.any.js
align with the BCD keys in bothstreams.yml
andasync-iterable-streams.yml
. If they don't, please update the YAML file accordingly. If they do, move on to step 2.async-iterator.any.js
, let's try to reorganize the test so it focuses on assertions for a single feature. If that's not feasible, proceed to step 3.web-features
repository to document this.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.
Thanks for clarifying.
If I understand correctly, there is the
streams
group which contains thestreams
feature and theasync-iterable-streams
feature. Thestreams
feature is supposed to be the "base" feature, whereas theasync-iterable-streams
feature is a later addition on top of that base feature. Following that logic, I agree that the streams for async iterable streams should not overlap with those of the base feature, so I'll add an exclusion forasync-iterator.any.js
so it's not part of thestreams
feature.I still have some questions though. (If this isn't the right place to ask them, I can also repost them as issues over at web-features.)
streams
feature (although the tests also cover later additions), or exclude them entirely?web-features
(see below). Should I add separate subfeatures for these? It looks like there was already some prior discussion in Addstreams
web-platform-dx/web-features#990 and Add more streams keys/features web-platform-dx/web-features#2358, but I'm not really sure where to go from there.ReadableStream.from(asyncIterable)
, added to the standard in June 2023 and shipped in Firefox 117Transformer.cancel()
, added to the standard in September 2023 but not yet shipping in any browserReadableStreamBYOBReader.read(view, {min})
, added to the standard in November 2023 and shipped in Firefox 134There 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.
I opened a PR to add more subfeatures for streams: web-platform-dx/web-features#2491