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

Unified Diff: sdk/lib/_internal/pub_generated/bin/async_compile.dart

Issue 766393002: Fix a couple bugs in r42055. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « sdk/lib/_internal/pub/lib/src/source/hosted.dart ('k') | sdk/lib/_internal/pub_generated/lib/src/io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub_generated/bin/async_compile.dart
diff --git a/sdk/lib/_internal/pub_generated/bin/async_compile.dart b/sdk/lib/_internal/pub_generated/bin/async_compile.dart
index ffdd761d4f4bf9949309312f0b5cf4095dbd2faf..a029c521294cef1603afbae148655e364cf1c8c6 100644
--- a/sdk/lib/_internal/pub_generated/bin/async_compile.dart
+++ b/sdk/lib/_internal/pub_generated/bin/async_compile.dart
@@ -61,9 +61,10 @@ void main(List<String> arguments) {
buildDir = rest.first;
} on FormatException catch (ex) {
- print(ex);
- print();
- print("Usage: dart async_compile.dart [--verbose] [--force] <build dir>");
+ stderr.writeln(ex);
+ stderr.writeln();
+ stderr.writeln(
+ "Usage: dart async_compile.dart [--verbose] [--force] <build dir>");
exit(64);
}
@@ -77,7 +78,7 @@ void main(List<String> arguments) {
var readme = new File(readmePath).readAsStringSync();
var match = _commitPattern.firstMatch(readme);
if (match == null) {
- print("Could not find compiler commit hash in README.md.");
+ stderr.writeln("Could not find compiler commit hash in README.md.");
exit(1);
}
@@ -150,7 +151,7 @@ String _getCurrentCommit() {
args,
workingDirectory: p.join(sourceDir, "../../../../third_party/pkg/async_await"));
if (result.exitCode != 0) {
- print("Could not get Git revision of async_await compiler.");
+ stderr.writeln("Could not get Git revision of async_await compiler.");
exit(1);
}
@@ -192,7 +193,7 @@ String _translateAsyncAwait(String sourcePath, String source) {
var result = new CodeFormatter().format(CodeKind.COMPILATION_UNIT, source);
return result.source;
} catch (ex) {
- print("Async compile failed on $sourcePath:\n$ex");
+ stderr.writeln("Async compile failed on $sourcePath:\n$ex");
hadFailure = true;
return null;
}
@@ -225,9 +226,9 @@ void _generateSnapshot(String buildDir) {
["--package-root=$packageRoot", "--snapshot=$snapshot", entrypoint]);
if (result.exitCode != 0) {
- print("Failed to generate snapshot:");
- if (result.stderr.trim().isNotEmpty) print(result.stderr);
- if (result.stdout.trim().isNotEmpty) print(result.stdout);
+ stderr.writeln("Failed to generate snapshot:");
+ if (result.stderr.trim().isNotEmpty) stderr.writeln(result.stderr);
+ if (result.stdout.trim().isNotEmpty) stderr.writeln(result.stdout);
exit(result.exitCode);
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/source/hosted.dart ('k') | sdk/lib/_internal/pub_generated/lib/src/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698