Skip to content

Commit

Permalink
*Properly* fix that package-root bug.
Browse files Browse the repository at this point in the history
It turns out internally we expect the package root to be a path, so we
should only convert it at the boundary to dart2js.

R=kevmoo@google.com

Review URL: https://codereview.chromium.org//1051133002
  • Loading branch information
nex3 committed Apr 2, 2015
1 parent 28be1aa commit c67bd5b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 0.12.0-beta.4

* Fix a package-root bug.

### 0.12.0-beta.3

* Add support for `shelf` `0.6.0`.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/runner/browser/compiler_pool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void main(_) {
var args = ["--checked", wrapperPath, "--out=$jsPath"];

if (packageRoot != null) {
args.add("--package-root=${p.absolute(packageRoot)}");
args.add("--package-root=${p.toUri(p.absolute(packageRoot))}");
}

if (_color) args.add("--enable-diagnostic-colors");
Expand Down
2 changes: 1 addition & 1 deletion lib/src/util/io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ String packageRootFor(String path, [String override]) {
throw new LoadException(path, "Directory $packageRoot does not exist.");
}

return p.toUri(packageRoot).toString();
return packageRoot;
}

/// The library name must be globally unique, or the wrong library path may be
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: test
version: 0.12.0-beta.3
version: 0.12.0-beta.4
author: Dart Team <misc@dartlang.org>
description: A library for writing dart unit tests.
homepage: https://github.com/dart-lang/test
Expand Down

0 comments on commit c67bd5b

Please sign in to comment.