Bug 76836 - [meta] Stop rebuilding .h/.cpp files generated by unchanged IDLs
Summary: [meta] Stop rebuilding .h/.cpp files generated by unchanged IDLs
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
Depends on: 76970 76841 76846 76874 76918 76920 76922 76923 76926
  Show dependency treegraph
Reported: 2012-01-23 09:10 PST by Kentaro Hara
Modified: 2013-06-17 16:10 PDT (History)
4 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-01-23 09:10:37 PST
Currently, if *any* of IDL files is updated, then generate-bindings.pl runs for *all* IDL files, and all .h/.cpp files are re-generated and rebuilt.

We can stop the redundant rebuilding by having CodeGenerators write the output .h/.cpp file to a temp file and then overwrite the .h/.cpp only if the bytes differ.
Comment 1 Kentaro Hara 2012-01-23 09:38:47 PST
I'll get things done in the following steps:

[1] Remove finish() from CodeGeneratorV8.pm.
[2] Remove finish() from CodeGeneratorJS.pm.
[3] Remove finish() from CodeGenerator{ObjC,GObject,CPP}.pm and CodeGenerator.pm.
[4] Make a change on CodeGeneratorV8.pm and CodeGenerator.pm to overwrite .h/.cpp files only when the bytes differ.
[5] Make similar changes on CodeGeneratorJS.pm.
[6] Make similar changes on CodeGenerator{ObjC,GObject,CPP}.pm.
Comment 2 Adam Barth 2012-01-23 11:45:30 PST
Sounds like a good idea.
Comment 3 Darin Adler 2012-01-23 13:29:45 PST
Can we change this so code is shared while doing the work 6 times?
Comment 4 Kentaro Hara 2012-01-23 13:31:28 PST
(In reply to comment #3)
> Can we change this so code is shared while doing the work 6 times?

Sure. I'll make UpdateFileIfChanged() in CodeGenerator.pm and use it from all CodeGenerators.
Comment 5 Alexey Proskuryakov 2013-06-17 16:10:58 PDT
*** Bug 117708 has been marked as a duplicate of this bug. ***