Summary: | generate-message-receiver.py can't handle nested #ifs | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> | ||||||||||||||
Component: | New Bugs | Assignee: | Gergő Balogh <gbalogh.u-szeged> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | andersca, ap, aroben, benjamin, commit-queue, darin, enrica, galpeter, kling, ossy | ||||||||||||||
Priority: | P2 | ||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
Bug Depends on: | |||||||||||||||||
Bug Blocks: | 121818, 124147 | ||||||||||||||||
Attachments: |
|
Description
Csaba Osztrogonác
2013-09-24 16:14:58 PDT
Created attachment 212516 [details]
generated cpp with nested ifdefs
Created attachment 212517 [details]
generated cpp without nested ifdefs
and the change caused this problem - http://trac.webkit.org/changeset/156350/trunk/Source/WebKit2/UIProcess/WebContext.messages.in Created attachment 212547 [details]
Patch
workaround to avoid adding nested #ifs until proper fix
View in context: https://bugs.webkit.org/attachment.cgi?id=212547&action=review > Source/WebKit2/Scripts/webkit2/parser.py:51 > + sys.stderr.write('ERROR: Nested #ifs aren\'t supported, please fix %s\n' % file.name) You can mix ' and " together then you don't need to escape the ' (use " for the string start and end) > Source/WebKit2/Scripts/webkit2/parser.py:52 > + os._exit(1) The standard way to exit is sys.exit(n) as dictated by the python documentation. Created attachment 212553 [details]
workaround
updated patch based on Peter's review
(In reply to comment #6) > Created an attachment (id=212553) [details] > workaround > > updated patch based on Peter's review LGTM (BTW: Much better isn't? :)) Is there any objection against adding this guard to avoid adding nested #ifs until proper fix? Comment on attachment 212553 [details] workaround Clearing flags on attachment: 212553 Committed r157243: <http://trac.webkit.org/changeset/157243> Created attachment 214558 [details]
patch
Attachment 214558 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Scripts/webkit2/messages_unittest.py', u'Source/WebKit2/Scripts/webkit2/parser.py']" exit_code: 1
Source/WebKit2/ChangeLog:9: Line contains tab character. [whitespace/tab] [5]
Total errors found: 1 in 3 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 214559 [details]
patch
(In reply to comment #12) > Created an attachment (id=214559) [details] > patch I think this would be really good to have. I've seen other bug reports where they expected to have nested #if-s Certainly a good thing, just needs someone to review the code. Is there a brave WK2 owner somewhere for reviewing this patch? :) Comment on attachment 214559 [details] patch Clearing flags on attachment: 214559 Committed r159312: <http://trac.webkit.org/changeset/159312> All reviewed patches have been landed. Closing bug. |