Bug 29114 - JS and ObjC binding dependencies not taken into account by DerivedSources.make
Summary: JS and ObjC binding dependencies not taken into account by DerivedSources.make
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 28831
  Show dependency treegraph
 
Reported: 2009-09-09 17:55 PDT by Cameron McCormack (:heycam)
Modified: 2022-02-05 13:02 PST (History)
1 user (show)

See Also:


Attachments
Patch v1 (14.02 KB, patch)
2009-09-10 00:24 PDT, Cameron McCormack (:heycam)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron McCormack (:heycam) 2009-09-09 17:55:53 PDT
Since the Objective C bindings essentially flatten multiple inheritance in the generated DOM*.mm files, there are dependencies on ancestor IDL files that aren't noticed by DerivedSources.make.  For example, the SVGAnimationElement interface inheritance hierarchy looks like:

  SVGAnimationElement
   |
   +--SVGElement
   |   |
   |   +--Element
   |       |
   |       +-- ...
   |
   +--SVGTests
   |
   +--SVGExternalResourcesRequired
   |
   +--ElementTimeControl

All of the attributes and operations in SVGTests, SVGExternalResourcesRequired and ElementTimeControl will be implemented in SVGAnimationElement.mm, but make doesn't know that SVGAnimationElement.mm depends on SVGTests.idl, SVGExternalResourcesRequired.idl and ElementTimeControl.idl.

Thus, if a patch touches ElementTimeControl.idl, for example, the build will break unless a clean is done first (or something else that forces the bindings to be regenerated, such as touching CodeGenerator.pm).

This probably affects the V8 bindings too, but I haven't looked closely enough to be sure.
Comment 1 Cameron McCormack (:heycam) 2009-09-10 00:22:15 PDT
Same for the JS bindings.
Comment 2 Cameron McCormack (:heycam) 2009-09-10 00:24:55 PDT
Created attachment 39327 [details]
Patch v1

This patch makes DerivedSources.make use automatically generated dependency information à la http://make.paulandlesley.org/autodep.html#advanced to ensure that changes to multiply inherited IDL interfaces (such as ElementTimeControl in the example above) cause the JS and ObJC binding classes to be regenerated.
Comment 3 Eric Seidel (no email) 2009-09-10 13:17:44 PDT
Comment on attachment 39327 [details]
Patch v1

Wow.  That's just awesome.

It would be nice to see an example .deps file, but this looks great!
Comment 4 WebKit Commit Bot 2009-09-10 14:34:07 PDT
Comment on attachment 39327 [details]
Patch v1

Clearing flags on attachment: 39327

Committed r48266: <http://trac.webkit.org/changeset/48266>
Comment 5 WebKit Commit Bot 2009-09-10 14:34:10 PDT
All reviewed patches have been landed.  Closing bug.