Index: sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart b/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart |
index 1b22647b694f8600f650604f36aec63938b33086..e0b218590973d965b33b402581c523e06825a905 100644 |
--- a/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart |
+++ b/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart |
@@ -125,8 +125,7 @@ class Dart2JSTransformer extends Transformer implements LazyTransformer { |
// against. |
var id = transform.primaryInput.id; |
- var entrypoint = path.join(_environment.graph.packages[id.package].dir, |
- id.path); |
+ var entrypoint = _environment.graph.packages[id.package].path(id.path); |
// TODO(rnystrom): Should have more sophisticated error-handling here. Need |
// to report compile errors to the user in an easily visible way. Need to |
@@ -141,7 +140,7 @@ class Dart2JSTransformer extends Transformer implements LazyTransformer { |
'minify', defaultsTo: _settings.mode == BarbackMode.RELEASE), |
verbose: _configBool('verbose'), |
environment: _configEnvironment, |
- packageRoot: path.join(_environment.rootPackage.dir, "packages"), |
+ packageRoot: _environment.rootPackage.path("packages"), |
analyzeAll: _configBool('analyzeAll'), |
suppressWarnings: _configBool('suppressWarnings'), |
suppressHints: _configBool('suppressHints'), |
@@ -260,7 +259,7 @@ class _BarbackCompilerProvider implements dart.CompilerProvider { |
// TODO(rnystrom): Fix this if #17751 is fixed. |
var buildDir = _environment.getSourceDirectoryContaining( |
_transform.primaryInput.id.path); |
- _libraryRootPath = path.join(_environment.rootPackage.dir, |
+ _libraryRootPath = _environment.rootPackage.path( |
buildDir, "packages", r"$sdk"); |
} |
@@ -395,8 +394,8 @@ class _BarbackCompilerProvider implements dart.CompilerProvider { |
// should be loaded directly from disk. |
var sourcePath = path.fromUri(url); |
if (_environment.containsPath(sourcePath)) { |
- var relative = path.toUri(path.relative(sourcePath, |
- from: _environment.rootPackage.dir)).toString(); |
+ var relative = path.toUri(_environment.rootPackage.relative(sourcePath)) |
+ .toString(); |
return new AssetId(_environment.rootPackage.name, relative); |
} |