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

Finish, remove, or replace IDL-based global detection #38

Open
domenic opened this issue Aug 13, 2019 · 2 comments
Open

Finish, remove, or replace IDL-based global detection #38

domenic opened this issue Aug 13, 2019 · 2 comments
Milestone

Comments

@domenic
Copy link
Collaborator

domenic commented Aug 13, 2019

For constructors, we use data from the reffy-reports crawl.json as a backstop, to determine if something is a global constructor. That is, first we check the TypeScript definitions, and then we check the crawl.json derived globals-set.js.

The idea here was that the TypeScript definitions are updated less frequently than the universe of web specifications, so this would catch some cases that the TypeScript definitions would not.

We have not done similar work for other transforms (methods, getters/setters, namespace methods, ...).

We should either:

  • Extend this infrastructure to the other transforms. E.g., create a list of all methods on all web classes, and use that in the methods transform.
  • Remove this infrastructure and replace it with something simpler. For example, a "additional-originals.js" file, either checked in to this repository or fed as input to the CLI tool, which can contain any specific originals that we need to rewrite but have not made it in to the TypeScript definitions yet.
  • Remove this infrastructure and replace it with something TypeScript based, e.g. allow additional .d.ts files.

I tend toward remove/replace. The last option seems most congruent with our existing infrastructure, but a bit more work. The second option is probably simplest.

I think it would be fine to do this in two parts, first remove, then replace. We could even wait until we have a concrete case of something not in the TypeScript definitions before working on the replacement.

@fergald
Copy link
Collaborator

fergald commented Aug 14, 2019

I wonder if

https://cs.chromium.org/chromium/src/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt

would be helpful here. Obviously not something we can include in this repo but maybe we can teach this to load a file in that format and then when used in blink, we can pass this file.

jackbsteinberg pushed a commit that referenced this issue Aug 21, 2019
Addresses some of the concerns in #38, but does not close the issue.
@jackbsteinberg
Copy link
Owner

Just pushed #47 to remove IDL checking, the issue still stands at the moment however with regards to newer globals that TypeScript will take longer to get around to, so there need will be a replacement for the IDL checking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants