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

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

Issue 1658763002: mojom.dart: Allow package name != directory name (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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/dart/packages/mojom/lib/src/mojom_finder.dart » ('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:collection';
10 import 'dart:convert'; 11 import 'dart:convert';
11 import 'dart:developer' as dev; 12 import 'dart:developer' as dev;
12 import 'dart:io'; 13 import 'dart:io';
13 14
14 import 'package:mojom/src/utils.dart'; 15 import 'package:mojom/src/utils.dart';
15 import 'package:path/path.dart' as path; 16 import 'package:path/path.dart' as path;
17 import 'package:yaml/yaml.dart' as yaml;
16 18
17 part 'mojom_finder.dart'; 19 part 'mojom_finder.dart';
18 20
19 const String mojoTestPackage = '_mojo_for_test_only'; 21 const String mojoTestPackage = '_mojo_for_test_only';
20 22
21 class MojomGenerator { 23 class MojomGenerator {
22 static dev.Counter _genMs; 24 static dev.Counter _genMs;
23 final bool _errorOnDuplicate; 25 final bool _errorOnDuplicate;
24 final bool _dryRun; 26 final bool _dryRun;
25 final bool _force; 27 final bool _force;
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 '\t$dart $packRoot $scriptPath single -m $mojoSdk -r $root ' 448 '\t$dart $packRoot $scriptPath single -m $mojoSdk -r $root '
447 '-p $packagePath $skips'); 449 '-p $packagePath $skips');
448 _errors++; 450 _errors++;
449 return; 451 return;
450 } 452 }
451 } 453 }
452 } 454 }
453 455
454 bool _shouldSkip(File f) => containsPrefix(f.path, _skip); 456 bool _shouldSkip(File f) => containsPrefix(f.path, _skip);
455 } 457 }
OLDNEW
« no previous file with comments | « no previous file | mojo/dart/packages/mojom/lib/src/mojom_finder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698