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

Expand checks run by Web IDL study tool #331

Merged
merged 3 commits into from
Apr 12, 2023
Merged

Expand checks run by Web IDL study tool #331

merged 3 commits into from
Apr 12, 2023

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Apr 12, 2023

This expands the Web IDL study tool to run additional checks:

  • Report unknown types
  • Report unknown extended attributes
  • Includes statements: target needs to be of type "interface"
  • Includes statements: mixin source (includes) needs to exist
  • Includes statements: type of mixin source needs to be "interface mixin"
  • Inheritance: same type required

These checks match (or should match :)) those performed in Webref already.

Reported anomaly objects could be further improved, e.g. to provide a more complete reference to the problematic IDL when it is at the attribute or parameter level and not at the definition level. To be done over time when we start submitting actual anomaly reports!

This would for example be useful in the case where an interface definition "Foo" defines 5 bool attributes (instead of boolean). The tool will currently report 5 anomalies, all saying that the interface "Foo" references unknown type bool.

Still missing:

  • Split unknown types into unknown and "known unknown" types, e.g. when an interface references a namespace
  • Checks once IDL gets merged: overloaded and duplicate methods

This expands the Web IDL study tool to run additional checks:
- Report unknown types
- Report unknown extended attributes
- Includes statements: target needs to be of type "interface"
- Includes statements: mixin source (includes) needs to exist
- Includes statements: type of mixin source needs to be "interface mixin"
- Inheritance: same type required

These checks match (or should match :)) those performed in Webref already.

Reported anomaly objects could be further improved, e.g. to provide a more
complete reference to the problematic IDL when it is at the attribute or
parameter level and not at the definition level. To be done over time when
we start submitting actual anomaly reports!

This would for example be useful in the case where an interface definition
"Foo" defines 5 `bool` attributes (instead of `boolean`). The tool will
currently report 5 anomalies, all saying that the interface "Foo" references
unknown type `bool`.

Still missing:
- Split unknown types into unknown and "known unknown" types, e.g. when an
interface references a namespace
- Checks once IDL gets merged: overloaded and duplicate methods
@tidoust
Copy link
Member Author

tidoust commented Apr 12, 2023

Split unknown types into unknown and "known unknown" types, e.g. when an interface references a namespace

More accurately, right now, the tool thinks that it is correct to reference a namespace or a mixin whereas it is not.

Copy link
Member

@dontcallmedom dontcallmedom left a comment

Choose a reason for hiding this comment

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

brilliant, thanks! a nit, completing a couple of already pushed editorial commits

test/study-webidl.js Show resolved Hide resolved
@tidoust tidoust merged commit 5965452 into main Apr 12, 2023
@tidoust tidoust deleted the expand-study-webidl branch April 12, 2023 09:17
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