Bug 191866 - Better parsing of comments in generate-message*.py
Summary: Better parsing of comments in generate-message*.py
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-20 13:02 PST by Keith Rollin
Modified: 2018-11-27 14:13 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.26 KB, patch)
2018-11-20 13:06 PST, Keith Rollin
no flags Details | Formatted Diff | Diff
Patch (3.30 KB, patch)
2018-11-27 12:59 PST, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2018-11-20 13:02:48 PST
The script parsing the *.messages.in files would treat a line starting with '#' as a comment, but not a line starting with '<whitespace>#'. This means that jamming a '#' right in front of the first character of a message definition (as opposed to the beginning of a line) will have no effect and the line will get treated just the same as a non-commented line. Fix this by trimming all white space from the beginning and ending of the line before processing it.
Comment 1 Radar WebKit Bug Importer 2018-11-20 13:03:30 PST
<rdar://problem/46189563>
Comment 2 Keith Rollin 2018-11-20 13:06:23 PST
Created attachment 355358 [details]
Patch
Comment 3 Chris Dumez 2018-11-27 12:51:26 PST
Comment on attachment 355358 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=355358&action=review

r=me

> Source/WebKit/Scripts/Makefile:8
> +	grep FakeLoadURL webkit/*-expected.* && "### Test failure: found commented-out functions in output" || true

I do not think we need this check here. Since you added comments to test-messages.in and webkit/MessageReceiver-expected.cpp did not change, it is validation enough.
Comment 4 Keith Rollin 2018-11-27 12:59:04 PST
Created attachment 355766 [details]
Patch
Comment 5 WebKit Commit Bot 2018-11-27 14:13:02 PST
Comment on attachment 355766 [details]
Patch

Clearing flags on attachment: 355766

Committed r238577: <https://trac.webkit.org/changeset/238577>
Comment 6 WebKit Commit Bot 2018-11-27 14:13:04 PST
All reviewed patches have been landed.  Closing bug.