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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/command/serve.dart

Issue 575733002: Revert "try again to not auto start editor port" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub_generated/lib/src/command/serve.dart
diff --git a/sdk/lib/_internal/pub_generated/lib/src/command/serve.dart b/sdk/lib/_internal/pub_generated/lib/src/command/serve.dart
index a6f27a5572177c75726f57fdea56ac41bd9a78bd..8255ec1932dda27f1446a923700dfdf870006ab2 100644
--- a/sdk/lib/_internal/pub_generated/lib/src/command/serve.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/command/serve.dart
@@ -23,6 +23,7 @@ class ServeCommand extends BarbackCommand {
return adminPort == null ? null : parseInt(adminPort, 'admin port');
}
bool get useDart2JS => commandOptions['dart2js'];
+ bool get logAdminUrl => commandOptions['log-admin-url'];
BarbackMode get defaultMode => BarbackMode.DEBUG;
List<String> get defaultSourceDirectories => ["web", "test"];
final _completer = new Completer();
@@ -66,77 +67,77 @@ class ServeCommand extends BarbackCommand {
var environment = x2;
var directoryLength =
sourceDirectories.map(((dir) => dir.length)).reduce(math.max);
- join2() {
- environment.pauseUpdates();
- var it0 = sourceDirectories.iterator;
- break0(x6) {
- environment.barback.errors.listen(((error) {
- log.error(log.red("Build error:\n$error"));
- }));
- environment.barback.results.listen(((result) {
- if (result.succeeded) {
- log.message(
- "Build completed ${log.green('successfully')}");
- } else {
- log.message(
- "Build completed with " "${log.red(result.errors.length)} errors.");
- }
+ environment.startAdminServer(adminPort).then((x3) {
+ try {
+ var server = x3;
+ server.results.listen(((_) {
+ assert(false);
}), onError: _fatalError);
- environment.resumeUpdates();
- _completer.future.then((x3) {
- try {
- x3;
- completer0.complete(null);
- } catch (e1) {
- completer0.completeError(e1);
- }
- }, onError: (e2) {
- completer0.completeError(e2);
- });
- }
- continue0(x7) {
- if (it0.moveNext()) {
- Future.wait([]).then((x5) {
- var directory = it0.current;
- _startServer(
- environment,
- directory,
- directoryLength).then((x4) {
+ join2() {
+ environment.pauseUpdates();
+ var it0 = sourceDirectories.iterator;
+ break0(x7) {
+ environment.barback.errors.listen(((error) {
+ log.error(log.red("Build error:\n$error"));
+ }));
+ environment.barback.results.listen(((result) {
+ if (result.succeeded) {
+ log.message(
+ "Build completed ${log.green('successfully')}");
+ } else {
+ log.message(
+ "Build completed with " "${log.red(result.errors.length)} errors.");
+ }
+ }), onError: _fatalError);
+ environment.resumeUpdates();
+ _completer.future.then((x4) {
try {
x4;
- continue0(null);
- } catch (e3) {
- completer0.completeError(e3);
+ completer0.complete(null);
+ } catch (e2) {
+ completer0.completeError(e2);
}
- }, onError: (e4) {
- completer0.completeError(e4);
+ }, onError: (e3) {
+ completer0.completeError(e3);
});
- });
- } else {
- break0(null);
+ }
+ continue0(x8) {
+ if (it0.moveNext()) {
+ Future.wait([]).then((x6) {
+ var directory = it0.current;
+ _startServer(
+ environment,
+ directory,
+ directoryLength).then((x5) {
+ try {
+ x5;
+ continue0(null);
+ } catch (e4) {
+ completer0.completeError(e4);
+ }
+ }, onError: (e5) {
+ completer0.completeError(e5);
+ });
+ });
+ } else {
+ break0(null);
+ }
+ }
+ continue0(null);
}
- }
- continue0(null);
- }
- if (adminPort != null) {
- environment.startAdminServer(adminPort).then((x8) {
- try {
- var server = x8;
- server.results.listen(((_) {
- assert(false);
- }), onError: _fatalError);
+ if (logAdminUrl) {
log.message(
"Running admin server on " "${log.bold('http://${hostname}:${server.port}')}");
join2();
- } catch (e5) {
- completer0.completeError(e5);
+ } else {
+ join2();
}
- }, onError: (e6) {
- completer0.completeError(e6);
- });
- } else {
- join2();
- }
+ } catch (e1) {
+ completer0.completeError(e1);
+ }
+ }, onError: (e6) {
+ completer0.completeError(e6);
+ });
} catch (e0) {
completer0.completeError(e0);
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698