RESOLVED FIXED 162960
Reuse CodeGenerator::UpdateFile in Tools CodeGenerator
https://bugs.webkit.org/show_bug.cgi?id=162960
Summary Reuse CodeGenerator::UpdateFile in Tools CodeGenerator
youenn fablet
Reported 2016-10-05 01:05:02 PDT
Currently, the binding generator is always updating generated files. Sometimes the content might be the same. In those cases, it might be best to let the generated files unchanged so that this does not trigger unnecessary compilation steps.
Attachments
Patch (6.93 KB, patch)
2016-10-05 02:33 PDT, youenn fablet
no flags
Patch (4.18 KB, patch)
2016-10-05 03:39 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2016-10-05 02:33:25 PDT
Fujii Hironori
Comment 2 2016-10-05 03:24:15 PDT
This approach has a problem described a following bug: Bug 131756 – Fix CodeGenerator.pm to only write files if the generated content has changed
youenn fablet
Comment 3 2016-10-05 03:35:13 PDT
(In reply to comment #2) > This approach has a problem described a following bug: > > Bug 131756 – Fix CodeGenerator.pm to only write files if the generated > content has changed Ah, thanks for the link! That is so bad though...
youenn fablet
Comment 4 2016-10-05 03:39:42 PDT
youenn fablet
Comment 5 2016-10-05 03:40:29 PDT
(In reply to comment #4) > Created attachment 290702 [details] > Patch Patch does some small refactoring and adds a FIXME about bug 131756.
Alex Christensen
Comment 6 2016-10-05 08:53:00 PDT
Comment on attachment 290702 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=290702&action=review r=me minus adding the comment. > Source/WebCore/bindings/scripts/CodeGenerator.pm:223 > + # FIXME: We should only write content if it is different from what is in the file. > + # But that would mean running more often the binding generator, see https://bugs.webkit.org/show_bug.cgi?id=131756 Nope, we've decided against this several times. We do lots of incremental builds on bots. It's faster to run the bindings generator once, update the files, and recompile things once than having to re-run all the bindings generators every time we build on that machine just to verify that the output would've been exactly what is on disk.
youenn fablet
Comment 7 2016-10-05 09:11:42 PDT
(In reply to comment #6) > Comment on attachment 290702 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=290702&action=review > > r=me minus adding the comment. > > > Source/WebCore/bindings/scripts/CodeGenerator.pm:223 > > + # FIXME: We should only write content if it is different from what is in the file. > > + # But that would mean running more often the binding generator, see https://bugs.webkit.org/show_bug.cgi?id=131756 > > Nope, we've decided against this several times. We do lots of incremental > builds on bots. It's faster to run the bindings generator once, update the > files, and recompile things once than having to re-run all the bindings > generators every time we build on that machine just to verify that the > output would've been exactly what is on disk. Ideally, we would like a solution that works for bots and people messing with the binding generator, hence the FIXME. FIXME is also there for preventing people to do what I did in the first patch. Do you want me to clarify the FIXME or is it good like that?
WebKit Commit Bot
Comment 8 2016-10-05 23:48:03 PDT
Comment on attachment 290702 [details] Patch Clearing flags on attachment: 290702 Committed r206851: <http://trac.webkit.org/changeset/206851>
WebKit Commit Bot
Comment 9 2016-10-05 23:48:09 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.