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

Unified Diff: lib/src/log.dart

Issue 1228683003: Fix various pub issues. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 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: lib/src/log.dart
diff --git a/lib/src/log.dart b/lib/src/log.dart
index 0b14ab30eb0b2050557c973e18d2ddb75903856c..a90bcadbaf097c660db64595141460f55caab5e6 100644
--- a/lib/src/log.dart
+++ b/lib/src/log.dart
@@ -528,11 +528,14 @@ class _JsonLogger {
// If the error came from a file, include the path.
if (error is SourceSpanException && error.span.sourceUrl != null) {
- errorJson["path"] = p.fromUri(error.span.sourceUrl);
+ // Normalize paths and make them absolute for backwards compatibility with
+ // the protocol used by the analyzer.
+ errorJson["path"] = p.normalize(p.absolute(
+ p.fromUri(error.span.sourceUrl)));
}
if (error is FileException) {
- errorJson["path"] = error.path;
+ errorJson["path"] = p.normalize(p.absolute(error.path));
}
this.message(errorJson);
« lib/src/dart.dart ('K') | « lib/src/dart.dart ('k') | lib/src/package.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698