make sure to always use path.url in the transformer
diff --git a/.status b/.status
index 537f6d9..7cc4696 100644
--- a/.status
+++ b/.status
@@ -11,14 +11,15 @@
*/*/*/*/packages/*/*: Skip
*/*/*/*/*/packages/*/*: Skip
-# failing tests
-test/deferred_library_test: RuntimeError # Issue 22592
-build/test/deferred_library_test: RuntimeError # Issue 22592
-
# tests that don't need to be ran after pub-build
build/test/transformer_test.dart: Skip
build/test/static_init_cycle_error_test.dart: Skip # Build time warning
+# failing tests
+[ $compiler == none ]
+test/deferred_library_test: RuntimeError # Issue 22592
+build/test/deferred_library_test: RuntimeError # Issue 22592
+
[ $browser ]
# All tests are for the standalone vm only
build/test/*: Skip
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69b7cc8..568e5af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.5.1+1
+
+* Make sure to always use `path.url` in the transformer.
+
## 0.5.1
* Added support for more types of expressions in constructor annotations. More
diff --git a/lib/transformer.dart b/lib/transformer.dart
index 390a2e2..90faf5d 100644
--- a/lib/transformer.dart
+++ b/lib/transformer.dart
@@ -347,8 +347,8 @@
_logger.error("Can't import `${id}` from `${_newEntryPoint}`");
} else if (path.url.split(id.path)[0] ==
path.url.split(_newEntryPoint.path)[0]) {
- var relativePath =
- path.relative(id.path, from: path.dirname(_newEntryPoint.path));
+ var relativePath = path.url.relative(
+ id.path, from: path.url.dirname(_newEntryPoint.path));
buffer.write("import '${relativePath}'");
} else {
_logger.error("Can't import `${id}` from `${_newEntryPoint}`");
@@ -437,10 +437,10 @@
}
// And finally compare based on the relative uri if both are file paths.
- var aUri = path.relative(a.source.uri.path,
- from: path.dirname(library.source.uri.path));
- var bUri = path.relative(b.source.uri.path,
- from: path.dirname(library.source.uri.path));
+ var aUri = path.url.relative(a.source.uri.path,
+ from: path.url.dirname(library.source.uri.path));
+ var bUri = path.url.relative(b.source.uri.path,
+ from: path.url.dirname(library.source.uri.path));
return aUri.compareTo(bUri);
})).map((import) => import.importedLibrary);
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 79d983e..8305682 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: initialize
-version: 0.5.1
+version: 0.5.1+1
author: Polymer.dart Authors <web@dartlang.org>
description: Generic building blocks for doing static initialization.
homepage: https://github.com/dart-lang/initialize