Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart

Issue 203413004: Provide URLs for assets from lib/ and asset/ in pub's websocket API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix some small bugs Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback/build_environment.dart ('k') | sdk/lib/_internal/pub/lib/src/barback/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698