Closed Bug 809281 Opened 12 years ago Closed 12 years ago

Fail the build if a Bindings.conf entry doesn't match any defined Web IDL interface

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ehsan.akhgari, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I just wasted a bunch of time wondering why my binaryNames specification in Bindings.conf is not taking effect, before I realized that I had a typo in the name of the interface in that file, and the build succeeded silently.  I think it makes sense for us to spit out an error message if we encounter a name in Bindings.conf which doesn't occur in any Web IDL file.
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Hmm.  So this doesn't quite work because the set of IDL files we build depends on compile flags.  So for example, MOZ_WEBRTC is not defined on Android or B2G, so MediaStreamList is not built, so we end up reporting an error on seeing MediaStream in the conf file.

Any ideas on how to handle that, given the conf file is not preprocessed?  :(
e.g., are those preprocessor symbols available as env vars or something?
Comment on attachment 679049 [details] [diff] [review]
Make sure all Bindings.conf entries correspond to actual IDL interfaces.

Review of attachment 679049 [details] [diff] [review]:
-----------------------------------------------------------------

I think we need to keep URI and Principal now.

::: dom/bindings/Configuration.py
@@ +20,5 @@
>  
> +        # Make sure all descriptors declared in the config are
> +        # actually something we know about from our IDL
> +        idlnames = set(map(lambda t: t.identifier.name,
> +                           filter(lambda i: i.isInterface(), parseData)))

This might be slightly cleaner and cheaper as:

     idlNames = set(t.identifier.name for t in parseData if t.isInterface())
Attachment #679049 - Flags: review?(peterv) → review+
Any reason not to land this?
Whiteboard: [need review]
It doesn't actually work right.  See comment 2...
I'm not sure there's a good way to do this at all actually.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: