Bug 84292 - KeywordLookupGenerator.py should take an output file as an argument
Summary: KeywordLookupGenerator.py should take an output file as an argument
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-18 15:48 PDT by Don Olmstead
Modified: 2012-04-19 15:45 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.96 KB, patch)
2012-04-19 14:06 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (2.09 KB, patch)
2012-04-19 14:42 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2012-04-18 15:48:08 PDT
Currently KeywordLookupGenerator.py writes to stdout only. The results are expected to be piped to a separate file when creating KeywordLookup.h. To make the script more friendly to GYP it should take an additional argument which specifies a file to write to.
Comment 1 Don Olmstead 2012-04-19 14:06:38 PDT
Created attachment 137970 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-04-19 14:16:11 PDT
Comment on attachment 137970 [details]
Patch

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

> Source/JavaScriptCore/KeywordLookupGenerator.py:32
> +if (len(sys.argv) > 2):

We should do the argument parsing separately, instead of re-using the args array in two places here.  Otherwise seems OK.  A hack, but OK.
Comment 3 Eric Seidel (no email) 2012-04-19 14:26:48 PDT
Comment on attachment 137970 [details]
Patch

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

> Source/JavaScriptCore/KeywordLookupGenerator.py:33
> +    file_output = open(sys.argv[-1], "w")

So I would use output_file_name = sys.argv[2] if len(sys.argsv) > 2

And then check "if output_file_name:"
Comment 4 Don Olmstead 2012-04-19 14:42:46 PDT
Created attachment 137977 [details]
Patch
Comment 5 WebKit Review Bot 2012-04-19 15:44:56 PDT
Comment on attachment 137977 [details]
Patch

Clearing flags on attachment: 137977

Committed r114684: <http://trac.webkit.org/changeset/114684>
Comment 6 WebKit Review Bot 2012-04-19 15:45:01 PDT
All reviewed patches have been landed.  Closing bug.