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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart

Issue 598883002: Fix an error-swallowing bug in pub and several bugs it was hiding. (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
Index: sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart b/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart
index b2fbb50070481d51ca84732e9885545481a2c2ee..1591046753bae989f27f3ba6f97266ec0955c298 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart
@@ -465,30 +465,6 @@ class AssetEnvironment {
]);
}
- // "$pub" is a psuedo-package that allows pub's transformer-loading
- // infrastructure to share code with pub proper. We provide it only during
- // the initial transformer loading process.
- var dartPath = assetPath('dart');
- var pubSources = listDir(dartPath, recursive: true)
- // Don't include directories.
- .where((file) => path.extension(file) == ".dart")
- .map((library) {
- var idPath = path.join('lib', path.relative(library, from: dartPath));
- return new AssetId('\$pub', path.toUri(idPath).toString());
- });
-
- // "$sdk" is a pseudo-package that allows the dart2js transformer to find
- // the Dart core libraries without hitting the file system directly. This
- // ensures they work with source maps.
- var libPath = path.join(sdk.rootDirectory, "lib");
- var sdkSources = listDir(libPath, recursive: true)
- .where((file) => path.extension(file) == ".dart")
- .map((file) {
- var idPath = path.join("lib",
- path.relative(file, from: sdk.rootDirectory));
- return new AssetId('\$sdk', path.toUri(idPath).toString());
- });
-
// Bind a server that we can use to load the transformers.
var transformerServer;
return BarbackServer.bind(this, _hostname, 0).then((server) {
@@ -532,7 +508,7 @@ class AssetEnvironment {
.then((_) => transformerServer.close());
}, fine: true);
}, [errorStream, barback.results, transformerServer.results]);
- }).then((_) => barback.removeSources(pubSources));
+ });
}, fine: true);
}
@@ -685,7 +661,7 @@ class AssetEnvironment {
Future _withStreamErrors(Future futureCallback(), List<Stream> streams) {
var completer = new Completer.sync();
var subscriptions = streams.map((stream) =>
- stream.listen((_) {}, onError: completer.complete)).toList();
+ stream.listen((_) {}, onError: completer.completeError)).toList();
new Future.sync(futureCallback).then((_) {
if (!completer.isCompleted) completer.complete();

Powered by Google App Engine
This is Rietveld 408576698