Index: sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart b/sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart |
index 77328fbdeac137b29e776f2a28a1622226d54e97..97d00cd6601ab1c04f15d11f6f76989de9e9df02 100644 |
--- a/sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart |
+++ b/sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart |
@@ -33,10 +33,10 @@ Future<Set> loadTransformers(BuildEnvironment environment, |
// TODO(nweiz): load from a "package:" URI when issue 12474 is fixed. |
var baseUrl = transformerServer.url; |
- var uri = '$baseUrl/packages/${id.package}/$path'; |
+ var uri = baseUrl.resolve('packages/${id.package}/$path'); |
var code = 'import "$uri";\n' + |
readAsset(p.join("dart", "transformer_isolate.dart")) |
- .replaceAll('<<URL_BASE>>', baseUrl); |
+ .replaceAll('<<URL_BASE>>', baseUrl.toString()); |
log.fine("Loading transformers from $assetId"); |
var port = new ReceivePort(); |
@@ -44,7 +44,7 @@ Future<Set> loadTransformers(BuildEnvironment environment, |
.then((_) => port.first) |
.then((sendPort) { |
return _call(sendPort, { |
- 'library': uri, |
+ 'library': uri.toString(), |
'mode': environment.mode.name, |
// TODO(nweiz): support non-JSON-encodable configuration maps. |
'configuration': JSON.encode(id.configuration) |