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

Unified Diff: tools/json_schema_compiler/compiler.py

Issue 11747025: Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ms release build Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/json_schema_compiler/code.py ('k') | tools/json_schema_compiler/model.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/compiler.py
diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py
index ae9237336f41af191a39fe1dbe87791ee3e16c09..a347541dd5c60984a6c86cad3ab55c7eccf8e527 100755
--- a/tools/json_schema_compiler/compiler.py
+++ b/tools/json_schema_compiler/compiler.py
@@ -69,13 +69,16 @@ def handle_single_schema(filename, dest_dir, root, root_namespace):
referenced_api_defs = json_schema.Load(referenced_schema_path)
for namespace in referenced_api_defs:
- api_model.AddNamespace(namespace,
+ api_model.AddNamespace(
+ namespace,
os.path.relpath(referenced_schema_path, opts.root))
# Gets the relative path from opts.root to the schema to correctly determine
# the include path.
relpath = os.path.relpath(schema, opts.root)
- namespace = api_model.AddNamespace(target_namespace, relpath)
+ namespace = api_model.AddNamespace(target_namespace,
+ relpath,
+ include_compiler_options=True)
if not namespace:
continue
@@ -130,7 +133,9 @@ def handle_bundle_schema(filenames, dest_dir, root, root_namespace):
relpath = os.path.relpath(os.path.normpath(filenames[0]), root)
for target_namespace, schema_filename in zip(api_defs, filenames):
- namespace = api_model.AddNamespace(target_namespace, relpath)
+ namespace = api_model.AddNamespace(target_namespace,
+ relpath,
+ include_compiler_options=True)
path, filename = os.path.split(schema_filename)
short_filename, extension = os.path.splitext(filename)
« no previous file with comments | « tools/json_schema_compiler/code.py ('k') | tools/json_schema_compiler/model.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698