Skip to content

Use BCD to autoremove unimplemented features - #915

Merged
Nathan Shively-Sanders (sandersn) merged 20 commits into
microsoft:masterfrom
saschanaz:bcd
Mar 4, 2021
Merged

Use BCD to autoremove unimplemented features#915
Nathan Shively-Sanders (sandersn) merged 20 commits into
microsoft:masterfrom
saschanaz:bcd

Conversation

@saschanaz

@saschanazKagami Sascha Rosylight (saschanaz) commented Sep 16, 2020

Copy link
Copy Markdown
Contributor

This patch focuses only on removing totally unimplemented features, and defers everything else:

  • features only with single implementation should be reevaluated later
  • features that are widely-supported but over-restricted by removedTypes.json should also be reevaluated later.

forceKeepAlive is quite huge now but it eventually will be removed once reevaluation ends.

Comment threadbaselines/webworker.generated.d.ts Outdated
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
};

interface ReadableStreamBYOBReader {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Mattias Buelens (@MattiasBuelens), could you review the Streams part of this removal? Thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UnderlyingByteSource, ReadableByteStreamControllerCallback and this ReadableStream constructor overload should be removed as well.

You might want to have a look at 361a870 (part of #890).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hang on, where did WritableStream and TransformStream go? There are still types referencing them (like GenericTransformStream and ReadableStream.pipeTo).

(I understand why they would need to be removed, but it still makes me sad to see them go... 😞)

@saschanazKagami Sascha Rosylight (saschanaz)Sep 18, 2020

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

The bright side is that this patch only disables some of your work but not removes them all. It can be enabled again when browsers implement them 👍

(Disabling them should also boost #890 👀👀)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

BTW, WritableStream and TransformStream are still alive as there is at least a single implementation and thus not covered here. This patch is intentionally only removes totally unimplemented ones to reduce the diff size.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Streams changes LGTM. 👍 Happy to see WritableStream and TransformStream are still alive! 😁

I think it's best to wait with landing #890 until after this PR lands. I'll see if I can rebase my PR to not completely remove the readable byte stream definitions, and instead rely on your work to auto-remove them. 🙂

@saschanaz

Copy link
Copy Markdown
ContributorAuthor

Oops, test fails 👀

@saschanaz
Kagami Sascha Rosylight (saschanaz) marked this pull request as ready for review September 18, 2020 08:14
@foolip

Copy link
Copy Markdown

@vinyldarkscratch this PR is of interest to our ongoing project. In particular the list of BCD bugs in #915 (comment) are things that can hopefully be fixed by using https://github.com/foolip/mdn-bcd-collector. Where they can't, that might reveal a deficiency in our approach.

@saschanaz

Copy link
Copy Markdown
ContributorAuthor

Changes are too big, maybe better to remove things progressively. I'll make separate PRs.

@sandersn

Copy link
Copy Markdown
Member

Orta Therox (@orta) and I like this idea -- in fact, we'd rather take this PR than the dozen or so individual-removal PRs.

  • Do they remove the same set of declarations? It looks that way.
  • Is this PR ready to go otherwise? I've only scanned the code, but it looks OK at that level of detail.

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.

Approving the code change -- couple of open questions about the resulting DOM changes.

@saschanaz
Kagami Sascha Rosylight (saschanaz) marked this pull request as ready for review February 27, 2021 21:14
@saschanaz

Kagami Sascha Rosylight (saschanaz) commented Feb 27, 2021

Copy link
Copy Markdown
ContributorAuthor

Orta Therox (@orta) and I like this idea -- in fact, we'd rather take this PR than the dozen or so individual-removal PRs.

  • Do they remove the same set of declarations? It looks that way.

  • Is this PR ready to go otherwise? I've only scanned the code, but it looks OK at that level of detail.

  • Yes, they are already merged in this PR.
  • Also yes. It's using older version of BCD since the PR has been rotting, though.

@orta

Copy link
Copy Markdown
Contributor

Cool, IMO we should let's get this in and into the compiler then 👍🏻

@sandersn
Nathan Shively-Sanders (sandersn) merged commit f45dc9f into microsoft:masterMar 4, 2021
@sandersn

Copy link
Copy Markdown
Member

I'm going to port this over to Typescript right now and will tag you (Orta Therox (@orta) and Kagami Sascha Rosylight (@saschanaz)) on the PR when it's ready.

@sandersn

Copy link
Copy Markdown
Member

OK, it is merged into TS now.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@saschanaz@foolip@sandersn@orta@MattiasBuelens@HolgerJeromin