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

Side by Side Diff: lib/src/runner/browser/compiler_pool.dart

Issue 1051133002: *Properly* fix that package-root bug. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 8 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 | « CHANGELOG.md ('k') | lib/src/util/io.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library test.util.compiler_pool; 5 library test.util.compiler_pool;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 IframeListener.start(() => test.main); 66 IframeListener.start(() => test.main);
67 } 67 }
68 '''); 68 ''');
69 69
70 var dart2jsPath = p.join(sdkDir, 'bin', 'dart2js'); 70 var dart2jsPath = p.join(sdkDir, 'bin', 'dart2js');
71 if (Platform.isWindows) dart2jsPath += '.bat'; 71 if (Platform.isWindows) dart2jsPath += '.bat';
72 72
73 var args = ["--checked", wrapperPath, "--out=$jsPath"]; 73 var args = ["--checked", wrapperPath, "--out=$jsPath"];
74 74
75 if (packageRoot != null) { 75 if (packageRoot != null) {
76 args.add("--package-root=${p.absolute(packageRoot)}"); 76 args.add("--package-root=${p.toUri(p.absolute(packageRoot))}");
77 } 77 }
78 78
79 if (_color) args.add("--enable-diagnostic-colors"); 79 if (_color) args.add("--enable-diagnostic-colors");
80 80
81 return Process.start(dart2jsPath, args).then((process) { 81 return Process.start(dart2jsPath, args).then((process) {
82 var compiler = new _Compiler(dartPath, process); 82 var compiler = new _Compiler(dartPath, process);
83 83
84 if (_compilers.isEmpty) _showProcess(compiler); 84 if (_compilers.isEmpty) _showProcess(compiler);
85 _compilers.add(compiler); 85 _compilers.add(compiler);
86 86
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 /// The underlying process. 129 /// The underlying process.
130 final Process process; 130 final Process process;
131 131
132 /// A future that will complete once this instance has finished running and 132 /// A future that will complete once this instance has finished running and
133 /// all its output has been printed. 133 /// all its output has been printed.
134 Future get onDone => onDoneCompleter.future; 134 Future get onDone => onDoneCompleter.future;
135 final onDoneCompleter = new Completer(); 135 final onDoneCompleter = new Completer();
136 136
137 _Compiler(this.path, this.process); 137 _Compiler(this.path, this.process);
138 } 138 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/util/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698