Use path.prettyUri in stack_trace. R=rnystrom@google.com Review URL: https://codereview.chromium.org//298873011 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/stack_trace@36599 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkgs/stack_trace/CHANGELOG.md b/pkgs/stack_trace/CHANGELOG.md index 0b45208..36c7d3c 100644 --- a/pkgs/stack_trace/CHANGELOG.md +++ b/pkgs/stack_trace/CHANGELOG.md
@@ -1,3 +1,9 @@ +## 0.9.3+2 + +* Update the dependency on path. + +* Improve the formatting of library URIs in stack traces. + ## 0.9.3+1 * If an error is thrown in `Chain.capture`'s `onError` handler, that error is
diff --git a/pkgs/stack_trace/lib/src/frame.dart b/pkgs/stack_trace/lib/src/frame.dart index 67438c3..5b376e2 100644 --- a/pkgs/stack_trace/lib/src/frame.dart +++ b/pkgs/stack_trace/lib/src/frame.dart
@@ -88,11 +88,7 @@ /// /// This will usually be the string form of [uri], but a relative URI will be /// used if possible. - String get library { - if (uri.scheme != Uri.base.scheme) return uri.toString(); - if (path.style == path.Style.url) return path.relative(uri.toString()); - return path.relative(path.fromUri(uri)); - } + String get library => path.prettyUri(uri); /// Returns the name of the package this stack frame comes from, or `null` if /// this stack frame doesn't come from a `package:` URL.
diff --git a/pkgs/stack_trace/pubspec.yaml b/pkgs/stack_trace/pubspec.yaml index d0cc30f..e75d338 100644 --- a/pkgs/stack_trace/pubspec.yaml +++ b/pkgs/stack_trace/pubspec.yaml
@@ -1,14 +1,14 @@ name: stack_trace -version: 0.9.3+1 +version: 0.9.3+2 author: "Dart Team <misc@dartlang.org>" homepage: http://www.dartlang.org description: > A package for manipulating stack traces and printing them readably. dependencies: - path: ">=1.0.0-rc.1 <2.0.0" + path: ">=1.2.0 <2.0.0" dev_dependencies: - unittest: ">=0.9.0 <0.10.0" + unittest: ">=0.9.0 <0.12.0" environment: - sdk: ">=0.8.10+6 <2.0.0" + sdk: ">=1.0.0 <2.0.0"