Skip to content

Validate that all IDL types are defined somewhere #106

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

Merged
merged 1 commit into from
Feb 18, 2021
Merged

Conversation

foolip
Copy link
Member

@foolip foolip commented Feb 18, 2021

No description provided.

}
}

const knownTypes = new Set([
Copy link
Member

Choose a reason for hiding this comment

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

@dontcallmedom I note that the WebIDL parser in Reffy has a similar list to avoid flagging well-known types as dependencies:
https://github.com/w3c/reffy/blob/master/src/cli/parse-webidl.js#L352

Comparing the two lists (leaving aside void and types defined by other specs), I note the following differences:

  • ArrayBufferView in Reffy's WebIDL parser list but not here
  • BufferSource in Reffy's WebIDL parser list but not here
  • DOMException in Reffy's WebIDL parser list but not here
  • DOMTimeStamp in Reffy's WebIDL parser list but not here
  • Error in Reffy's WebIDL parser list but not here
  • Function in Reffy's WebIDL parser list but not here
  • RegExp in Reffy's WebIDL parser list but not here
  • VoidFunction in Reffy's WebIDL parser list but not here
  • symbol here but not in Reffy's WebIDL parser list

Most of them are from section 4 in WebIDL and can probably be removed from Reffy's WebIDL parser list because they get defined as "real" WebIDL structures.

I'm not sure why Error and RegExp are in Reffy's WebIDL parser list.

Last one is symbol, which seems correct but does not appear in any spec that defines some WebIDL.

I don't think that any change is needed here. Obviously, "DRY" could be an idea but then lists should not have to change often so probably not worth the hassle.

Copy link
Member

Choose a reason for hiding this comment

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

I created w3c/reffy#516 to possibly refresh the list in Reffy.

@tidoust tidoust merged commit 243e507 into master Feb 18, 2021
@foolip foolip deleted the validate-types branch February 18, 2021 18:49
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

Successfully merging this pull request may close these issues.

2 participants