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

Unified Diff: mojo/public/tools/bindings/mojom_bindings_generator_v1.py

Issue 1433183002: Generate Mojom Types for Dart (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Simplify identifier_store for Go and Dart Created 5 years, 1 month 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
Index: mojo/public/tools/bindings/mojom_bindings_generator_v1.py
diff --git a/mojo/public/tools/bindings/mojom_bindings_generator_v1.py b/mojo/public/tools/bindings/mojom_bindings_generator_v1.py
index 6b455b3d54496401635272a4efd70f7a465a2a65..18711877128524b6e8a10f8938df6a85886e5ec8 100755
--- a/mojo/public/tools/bindings/mojom_bindings_generator_v1.py
+++ b/mojo/public/tools/bindings/mojom_bindings_generator_v1.py
@@ -138,6 +138,7 @@ class MojomProcessor(object):
for generator_module in generator_modules:
generator = generator_module.Generator(module, args.output_dir)
filtered_args = []
+
if hasattr(generator_module, 'GENERATOR_PREFIX'):
prefix = '--' + generator_module.GENERATOR_PREFIX + '_'
filtered_args = [arg for arg in remaining_args
@@ -206,6 +207,12 @@ def main(argv):
help="use Python modules bundled in the SDK")
(args, remaining_args) = parser.parse_known_args(argv)
+ # These flags are added to ensure that tests requiring type information pass.
+ # TODO(afandria): The caller of this script should be the one passing these
+ # flags in. https://github.com/domokit/mojo/issues/558
+ remaining_args.append("--dart_gen_types")
+ remaining_args.append("--go_gen_types")
+
generator_modules = LoadGenerators(args.generators_string)
fileutil.EnsureDirectoryExists(args.output_dir)

Powered by Google App Engine
This is Rietveld 408576698