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

Unified Diff: pkg/compiler/lib/src/source_file_provider.dart

Issue 2237543002: Improve error reporting: use colors and associate the appropiate file with (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « pkg/compiler/bin/resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/source_file_provider.dart
diff --git a/pkg/compiler/lib/src/source_file_provider.dart b/pkg/compiler/lib/src/source_file_provider.dart
index 95a45bf1db3d02395f25c49bb33a1b6b209886ec..588c970afbc921fe8fd16de0c4667bc3cccef438 100644
--- a/pkg/compiler/lib/src/source_file_provider.dart
+++ b/pkg/compiler/lib/src/source_file_provider.dart
@@ -389,17 +389,20 @@ class BazelInputProvider extends SourceFileProvider {
@override
Future readFromUri(Uri uri) async {
+ var resolvedUri = uri;
var path = uri.path;
if (path.startsWith('/bazel-root')) {
path = path.substring('/bazel-root/'.length);
for (var dir in dirs) {
var file = dir.resolve(path);
if (await new File.fromUri(file).exists()) {
- uri = file;
+ resolvedUri = file;
break;
}
}
}
- return readUtf8BytesFromUri(uri);
+ var result = await readUtf8BytesFromUri(resolvedUri);
+ sourceFiles[uri] = sourceFiles[resolvedUri];
+ return result;
}
}
« no previous file with comments | « pkg/compiler/bin/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698