WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
136312
Web Replay: code generator should take supplemental specifications and allow cross-framework references
https://bugs.webkit.org/show_bug.cgi?id=136312
Summary
Web Replay: code generator should take supplemental specifications and allow ...
Brian Burg
Reported
2014-08-27 14:44:44 PDT
Right now, the input JSON files duplicate any enums defined in one namespace and used in another one. Instead, the code generator should take specifications from other frameworks as supplemental files, like the Inspector generator does.
Attachments
Patch
(115.00 KB, patch)
2015-01-18 23:22 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Patch (w/ Windows fix)
(116.22 KB, patch)
2015-01-19 13:23 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Patch (for EWS)
(116.84 KB, patch)
2015-01-19 14:01 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Patch (for EWS)
(116.68 KB, patch)
2015-01-19 14:22 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Patch (always Windows...)
(116.83 KB, patch)
2015-01-19 14:47 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Patch (for EWS, 5)
(116.84 KB, patch)
2015-01-19 16:24 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Patch (EWS)
(111.18 KB, patch)
2015-01-19 22:32 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Brian Burg
Comment 1
2015-01-18 23:00:28 PST
***
Bug 136311
has been marked as a duplicate of this bug. ***
Brian Burg
Comment 2
2015-01-18 23:22:46 PST
Created
attachment 244879
[details]
Patch
WebKit Commit Bot
Comment 3
2015-01-18 23:23:40 PST
This patch modifies the WEB_REPLAY inputs generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-input-generator-tests --reset-results`)
WebKit Commit Bot
Comment 4
2015-01-18 23:23:48 PST
Attachment 244879
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h:71: The parameter name "phase" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py:795: whitespace before '}' [pep8/E202] [5] ERROR: Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.h:60: The parameter name "button" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.h:81: The parameter name "button" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 4 in 41 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brian Burg
Comment 5
2015-01-19 13:23:03 PST
Created
attachment 244922
[details]
Patch (w/ Windows fix)
Joseph Pecoraro
Comment 6
2015-01-19 13:43:53 PST
Comment on
attachment 244922
[details]
Patch (w/ Windows fix) View in context:
https://bugs.webkit.org/attachment.cgi?id=244922&action=review
r=me
> Source/WebCore/ChangeLog:11 > + * replay/WebInputs.json: Moved common types to JSINputs.json.
Typo: "JSINputs.json"
> Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py:787 > + if len(self.setting('exportMacro')) > 0:
Would just "if len(...):" do?
> Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py:981 > + if len(input_filepaths) == 0:
This could also be "if !len(...):". Do what you think is clearer.
> Source/WebCore/DerivedSources.make:1164 > INPUT_GENERATOR_SPECIFICATIONS = \ > $(WebCore)/replay/WebInputs.json \ > + $(WebReplayScripts)/JSInputs.json \ > #
I wonder if we should split this up into two variables so one day someone doesn't try to sort these in a different order and inadvertently break things since the order here is important. Nothing to do here unless you want to.
Brian Burg
Comment 7
2015-01-19 13:53:39 PST
Comment on
attachment 244922
[details]
Patch (w/ Windows fix) View in context:
https://bugs.webkit.org/attachment.cgi?id=244922&action=review
Will rebase and EWS one more time before landing.
>> Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py:787 >> + if len(self.setting('exportMacro')) > 0: > > Would just "if len(...):" do?
There are only a few places in WebKit python code that use such implicit conversions with len(), so I'm shy to add more.
>> Source/WebCore/DerivedSources.make:1164 >> # > > I wonder if we should split this up into two variables so one day someone doesn't try to sort these in a different order and inadvertently break things since the order here is important. > > Nothing to do here unless you want to.
The order is *not* important. Specifications are not type-checked (i.e., try to lookup all type references between files) until all input files are parsed. Maybe I should put that into the changelog.
Brian Burg
Comment 8
2015-01-19 14:01:54 PST
Created
attachment 244924
[details]
Patch (for EWS)
Brian Burg
Comment 9
2015-01-19 14:22:53 PST
Created
attachment 244925
[details]
Patch (for EWS)
WebKit Commit Bot
Comment 10
2015-01-19 14:25:27 PST
Attachment 244925
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h:71: The parameter name "phase" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py:806: whitespace before '}' [pep8/E202] [5] ERROR: Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.h:60: The parameter name "button" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.h:81: The parameter name "button" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 4 in 42 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brian Burg
Comment 11
2015-01-19 14:47:38 PST
Created
attachment 244927
[details]
Patch (always Windows...)
Brian Burg
Comment 12
2015-01-19 16:24:22 PST
Created
attachment 244935
[details]
Patch (for EWS, 5)
Brian Burg
Comment 13
2015-01-19 22:32:57 PST
Created
attachment 244969
[details]
Patch (EWS)
Brian Burg
Comment 14
2015-01-20 08:52:16 PST
Committed
r178714
: <
http://trac.webkit.org/changeset/178714
>
Brian Burg
Comment 15
2015-01-20 08:55:57 PST
(In reply to
comment #14
)
> Committed
r178714
: <
http://trac.webkit.org/changeset/178714
>
Based on the reviewed patch with fix for windows (locally confirmed to fix known build issue). Landed manually since I was unable to convince EWS to apply changes to copy-files.cmd, which address the windows issue. I'll be watching in case Windows still has problems.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug