Bug 131756

Summary: Fix CodeGenerator.pm to only write files if the generated content has changed
Product: WebKit Reporter: Bem Jones-Bey <bjonesbe>
Component: Tools / TestsAssignee: Bem Jones-Bey <bjonesbe>
Status: RESOLVED LATER    
Severity: Normal CC: ap, cdumez, cgarcia, commit-queue, Hironori.Fujii, mjs, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Bem Jones-Bey 2014-04-16 13:39:05 PDT
Fix CodeGenerator.pm to only write files if the generated content has changed
Comment 1 Bem Jones-Bey 2014-04-16 13:41:32 PDT
Created attachment 229475 [details]
Patch
Comment 2 Sam Weinig 2014-04-16 13:42:49 PDT
Comment on attachment 229475 [details]
Patch

Sweet!
Comment 3 WebKit Commit Bot 2014-04-16 14:14:52 PDT
Comment on attachment 229475 [details]
Patch

Clearing flags on attachment: 229475

Committed r167384: <http://trac.webkit.org/changeset/167384>
Comment 4 WebKit Commit Bot 2014-04-16 14:14:56 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Alexey Proskuryakov 2014-04-17 09:38:44 PDT
I thought that we decided against this approach several times before, because it means that input files will always be newer than the outputs, so we will be running CodeGenerator.pm on most inputs every time.

Am I missing something?
Comment 6 Bem Jones-Bey 2014-04-17 11:31:10 PDT
(In reply to comment #5)
> I thought that we decided against this approach several times before, because it means that input files will always be newer than the outputs, so we will be running CodeGenerator.pm on most inputs every time.
> 
> Am I missing something?

You're right, that is a problem with this change. I believe I can fix that problem, however. I'll work on a fix for that today.
Comment 7 Bem Jones-Bey 2014-04-17 15:11:22 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > I thought that we decided against this approach several times before, because it means that input files will always be newer than the outputs, so we will be running CodeGenerator.pm on most inputs every time.
> > 
> > Am I missing something?
> 
> You're right, that is a problem with this change. I believe I can fix that problem, however. I'll work on a fix for that today.

I have a fix for the Mac build in Bug 131820.
Comment 8 Bem Jones-Bey 2014-04-17 18:05:50 PDT
Reverted r167384 for reason:

Sounds like this isn't the right fix, and causes generation to run far too often.

Committed r167474: <http://trac.webkit.org/changeset/167474>
Comment 9 Bem Jones-Bey 2014-04-28 17:30:31 PDT
I have no brilliant ideas on fixing this in the near term, so closing for now.
Comment 10 Fujii Hironori 2016-11-10 19:03:07 PST
generate-bindings-all.pl solves the original problem in a different approach.

* Bug 161433 – [CMake] CMake does not support the dep files for implicit dependency
* Bug 164054 – generate-bindings-all.pl should recompile supplemented IDL if its supplemental IDL are added or removed
* Bug 164121 – [CMake] Changing enabled features should trigger recompiling all IDL