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

Unified Diff: lib/src/executable.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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/error_group.dart ('k') | lib/src/global_packages.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/executable.dart
diff --git a/lib/src/executable.dart b/lib/src/executable.dart
index c8e38ffa08594cf519dd56e10890770321b56c9b..adc134bece62586e7c55bebf0b2c5542bc10d7bd 100644
--- a/lib/src/executable.dart
+++ b/lib/src/executable.dart
@@ -5,6 +5,7 @@
import 'dart:async';
import 'dart:io';
+import 'package:async/async.dart';
import 'package:barback/barback.dart';
import 'package:path/path.dart' as p;
@@ -93,7 +94,7 @@ Future<int> runExecutable(Entrypoint entrypoint, String package,
// "bin".
if (p.split(executable).length == 1) executable = p.join("bin", executable);
- var vmArgs = [];
+ var vmArgs = <String>[];
// Run in checked mode.
if (checked) vmArgs.add("--checked");
@@ -218,7 +219,7 @@ Future<int> runSnapshot(String path, Iterable<String> args, {recompile(),
String packagesFile, bool checked: false}) async {
// TODO(nweiz): pass a flag to silence the "Wrong full snapshot version"
// message when issue 20784 is fixed.
- var vmArgs = [];
+ var vmArgs = <String>[];
if (checked) vmArgs.add("--checked");
if (packagesFile != null) {
@@ -239,9 +240,9 @@ Future<int> runSnapshot(String path, Iterable<String> args, {recompile(),
if (recompile == null) {
stdin1 = stdin;
} else {
- var pair = tee(stdin);
- stdin1 = pair.first;
- stdin2 = pair.last;
+ var stdins = StreamSplitter.splitFrom(stdin);
+ stdin1 = stdins.first;
+ stdin2 = stdins.last;
}
runProcess(input) async {
« no previous file with comments | « lib/src/error_group.dart ('k') | lib/src/global_packages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698