Bug 79081 - [meta] Add an "IDL attribute checker" to detect typo of IDL attributes
Summary: [meta] Add an "IDL attribute checker" to detect typo of IDL attributes
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
Depends on: 79082 79090 79091 79160
  Show dependency treegraph
Reported: 2012-02-21 00:00 PST by Kentaro Hara
Modified: 2012-02-21 16:06 PST (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-02-21 00:00:52 PST
We have fixed 10~ bugs caused by typos of IDL attributes. Now we need an "IDL attribute checker", which checks if IDL attributes not implemented in code generates are not used in IDL files.

- The "IDL attribute checker" uses IDLAttributes.txt, which lists all IDL attributes implemented in code generators. If we want to add a new IDL attribute, we need to add it to IDLAttributes.txt manually.
- The "IDL attribute checker" checks if all IDL attributes used in IDL files are listed in IDLAttributes.txt.
- If the "IDL attribute checker" fails, the build fails with a verbose error message.

Considering the following build flow, I guess that resolve-supplemental.pl would be the right place to add the "IDL attribute checker".

supplemental_dependency.tmp: $(ALL_IDLS)
    perl resolve_supplemental.pl ...

JS%.cpp : %.idl supplemental_dependency.tmp
    perl generate-bindings.pl ...

To avoid build regression, I am planning to land the patch in the following steps:

- Enable the "IDL attribute checker" in Chromium.
- Enable the "IDL attribute checker" in all other build systems.
- Rename resolve-supplemental.pl to preprocess-idls.pl.
Comment 1 Adam Barth 2012-02-21 00:02:11 PST
Sounds great.