Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Issue 511943003: Generate externs automatically from json/idl files: minor changes.

Created:
6 years, 3 months ago by Vitaly Pavlenko
Modified:
5 years, 8 months ago
Base URL:
https://chromium.googlesource.com/chromium/src.git@true_master
Project:
chromium
Visibility:
Public.

Description

Generate externs automatically from json/idl files: minor changes. Continued from https://codereview.chromium.org/15677003/ New: - remove trailing comma in typedef - add "var " before types - generate namespace object - translate "events" R=tbreisacher@chromium.org TEST=tools/json_schema_compiler/compiler.py chrome/common/extensions/api/bookmark_manager_private.json --root=~/src/ --generator=externs

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -2 lines) Patch
M tools/json_schema_compiler/compiler.py View 2 chunks +8 lines, -2 lines 0 comments Download
A tools/json_schema_compiler/create_externs.sh View 1 chunk +13 lines, -0 lines 1 comment Download
A tools/json_schema_compiler/js_externs_generator.py View 1 chunk +234 lines, -0 lines 5 comments Download
M tools/json_schema_compiler/model.py View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
hirono
https://codereview.chromium.org/511943003/diff/1/tools/json_schema_compiler/js_externs_generator.py File tools/json_schema_compiler/js_externs_generator.py (right): https://codereview.chromium.org/511943003/diff/1/tools/json_schema_compiler/js_externs_generator.py#newcode1 tools/json_schema_compiler/js_externs_generator.py:1: # Copyright (c) 2013 The Chromium Authors. All rights ...
6 years, 2 months ago (2014-10-03 10:10:43 UTC) #2
Vitaly Pavlenko
https://codereview.chromium.org/511943003/diff/1/tools/json_schema_compiler/js_externs_generator.py File tools/json_schema_compiler/js_externs_generator.py (right): https://codereview.chromium.org/511943003/diff/1/tools/json_schema_compiler/js_externs_generator.py#newcode70 tools/json_schema_compiler/js_externs_generator.py:70: c.Append('var ' + type_.simple_name + ' = function();') On ...
6 years, 2 months ago (2014-10-03 23:33:44 UTC) #3
hirono
Sorry, I commented to the CL unintentionally. And yes. @fukino is working on crrev.com/625813003.
6 years, 2 months ago (2014-10-06 10:34:06 UTC) #4
Dan Beam
what's holding up this review? can we check this script in somewhere if we're already ...
5 years, 10 months ago (2015-02-24 23:46:14 UTC) #9
Tyler Breisacher (Chromium)
On 2015/02/24 23:46:14, Dan Beam wrote: > what's holding up this review? can we check ...
5 years, 10 months ago (2015-02-24 23:48:11 UTC) #10
Dan Beam
On 2015/02/24 23:48:11, Tyler Breisacher (Chromium) wrote: > On 2015/02/24 23:46:14, Dan Beam wrote: > ...
5 years, 10 months ago (2015-02-24 23:53:14 UTC) #11
Tyler Breisacher (Chromium)
Okay then yeah it should probably be checked in. https://codereview.chromium.org/511943003/diff/1/tools/json_schema_compiler/create_externs.sh File tools/json_schema_compiler/create_externs.sh (right): https://codereview.chromium.org/511943003/diff/1/tools/json_schema_compiler/create_externs.sh#newcode12 tools/json_schema_compiler/create_externs.sh:12: ...
5 years, 10 months ago (2015-02-25 00:17:24 UTC) #12
Tyler Breisacher (Chromium)
5 years, 10 months ago (2015-02-25 00:22:05 UTC) #13
Actually it would be cool to check this in, delete the generated externs, and
set up the build so that the generated externs from this script are used
automatically.

Anyway lgtm. Didn't know this was actually being used. That's kind of awesome :)

https://codereview.chromium.org/511943003/diff/1/tools/json_schema_compiler/j...
File tools/json_schema_compiler/js_externs_generator.py (right):

https://codereview.chromium.org/511943003/diff/1/tools/json_schema_compiler/j...
tools/json_schema_compiler/js_externs_generator.py:122: codeString =
'\n'.join(lines)
Can probably inline this?

codeString = '\n'.join(' * ' + line for line in lines)

(and it should be code_string IIRC)

https://codereview.chromium.org/511943003/diff/1/tools/json_schema_compiler/j...
tools/json_schema_compiler/js_externs_generator.py:182: return '?' # TODO make
this more specific
put someone's name on this TODO. I reluctantly volunteer mine if no one else
wants to own it.

Powered by Google App Engine
This is Rietveld 408576698