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

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

Issue 113453005: Add stack chain support to pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart b/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart
index c4b0597938e2d33cdc1729118e828aa5fd8cace6..f21ed9e4a638b17ee3f3e6c0ee5dca64ff0f239c 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart
@@ -11,6 +11,7 @@ import 'dart:io';
import 'package:analyzer/analyzer.dart';
import 'package:barback/barback.dart';
import 'package:path/path.dart' as path;
+import 'package:stack_trace/stack_trace.dart';
import '../../../../compiler/compiler.dart' as compiler;
import '../../../../compiler/implementation/dart2js.dart'
@@ -101,9 +102,10 @@ class Dart2JSTransformer extends Transformer {
// Need to report compile errors to the user in an easily visible way.
// Need to make sure paths in errors are mapped to the original source
// path so they can understand them.
- return dart.compile(entrypoint, provider,
+ return Chain.track(dart.compile(
+ entrypoint, provider,
packageRoot: packageRoot,
- minify: _mode == BarbackMode.RELEASE).then((_) {
+ minify: _mode == BarbackMode.RELEASE)).then((_) {
stopwatch.stop();
transform.logger.info("Took ${stopwatch.elapsed} to compile $id.");
});
@@ -266,7 +268,7 @@ class _BarbackCompilerProvider implements dart.CompilerProvider {
// skip Barback and just hit the file system. This will occur at the very
// least for dart2js's implementations of the core libraries.
var sourcePath = path.fromUri(url);
- return new File(sourcePath).readAsString();
+ return Chain.track(new File(sourcePath).readAsString());
}
AssetId _sourceUrlToId(Uri url) {

Powered by Google App Engine
This is Rietveld 408576698