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

Side by Side Diff: lib/src/command/barback.dart

Issue 2184303002: Make pub strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 4 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 | « lib/src/command.dart ('k') | lib/src/command/build.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:barback/barback.dart'; 7 import 'package:barback/barback.dart';
8 import 'package:path/path.dart' as path; 8 import 'package:path/path.dart' as path;
9 9
10 import '../command.dart'; 10 import '../command.dart';
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Make sure all of the source directories exist. 104 // Make sure all of the source directories exist.
105 var missing = sourceDirectories.where( 105 var missing = sourceDirectories.where(
106 (dir) => !dirExists(entrypoint.root.path(dir))); 106 (dir) => !dirExists(entrypoint.root.path(dir)));
107 107
108 if (missing.isNotEmpty) { 108 if (missing.isNotEmpty) {
109 dataError(_directorySentence(missing, "does", "do", "not exist")); 109 dataError(_directorySentence(missing, "does", "do", "not exist"));
110 } 110 }
111 111
112 // Make sure the directories don't overlap. 112 // Make sure the directories don't overlap.
113 var sources = sourceDirectories.toList(); 113 var sources = sourceDirectories.toList();
114 var overlapping = new Set(); 114 var overlapping = new Set<String>();
115 for (var i = 0; i < sources.length; i++) { 115 for (var i = 0; i < sources.length; i++) {
116 for (var j = i + 1; j < sources.length; j++) { 116 for (var j = i + 1; j < sources.length; j++) {
117 if (path.isWithin(sources[i], sources[j]) || 117 if (path.isWithin(sources[i], sources[j]) ||
118 path.isWithin(sources[j], sources[i])) { 118 path.isWithin(sources[j], sources[i])) {
119 overlapping.add(sources[i]); 119 overlapping.add(sources[i]);
120 overlapping.add(sources[j]); 120 overlapping.add(sources[j]);
121 } 121 }
122 } 122 }
123 } 123 }
124 124
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 var verb = pluralize(singularVerb, directoryNames.length, 187 var verb = pluralize(singularVerb, directoryNames.length,
188 plural: pluralVerb); 188 plural: pluralVerb);
189 189
190 var result = "$directories $names $verb"; 190 var result = "$directories $names $verb";
191 if (suffix != null) result += " $suffix"; 191 if (suffix != null) result += " $suffix";
192 result += "."; 192 result += ".";
193 193
194 return result; 194 return result;
195 } 195 }
196 } 196 }
OLDNEW
« no previous file with comments | « lib/src/command.dart ('k') | lib/src/command/build.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698