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

Side by Side Diff: mojo/dart/packages/mojom/lib/src/generate.dart

Issue 1566203002: Only generate code for files that are specified, not their imports. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | mojo/public/tools/bindings/mojom.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /// This library generates Mojo bindings for a Dart package. 5 /// This library generates Mojo bindings for a Dart package.
6 6
7 library generate; 7 library generate;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 final arguments = [ 164 final arguments = [
165 '--use_bundled_pylibs', 165 '--use_bundled_pylibs',
166 '-g', 166 '-g',
167 'dart', 167 'dart',
168 '-o', 168 '-o',
169 output, 169 output,
170 '-I', 170 '-I',
171 sdkInc, 171 sdkInc,
172 '-I', 172 '-I',
173 importDir.path 173 importDir.path,
174 '--no-gen-imports'
174 ]; 175 ];
175 if (servicesPath != null) { 176 if (servicesPath != null) {
176 arguments.add('-I'); 177 arguments.add('-I');
177 arguments.add(servicesPath); 178 arguments.add(servicesPath);
178 } 179 }
179 arguments.add(mojom.path); 180 arguments.add(mojom.path);
180 181
181 log.info('Generating $mojom'); 182 log.info('Generating $mojom');
182 log.info('$script ${arguments.join(" ")}'); 183 log.info('$script ${arguments.join(" ")}');
183 log.info('dryRun = $_dryRun'); 184 log.info('dryRun = $_dryRun');
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 '\t$dart $packRoot $scriptPath single -m $mojoSdk -r $root ' 437 '\t$dart $packRoot $scriptPath single -m $mojoSdk -r $root '
437 '-p $packagePath $skips'); 438 '-p $packagePath $skips');
438 _errors++; 439 _errors++;
439 return; 440 return;
440 } 441 }
441 } 442 }
442 } 443 }
443 444
444 bool _shouldSkip(File f) => containsPrefix(f.path, _skip); 445 bool _shouldSkip(File f) => containsPrefix(f.path, _skip);
445 } 446 }
OLDNEW
« no previous file with comments | « no previous file | mojo/public/tools/bindings/mojom.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698