| Index: sdk/lib/_internal/pub_generated/lib/src/barback/transformer_isolate.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/barback/transformer_isolate.dart b/sdk/lib/_internal/pub_generated/lib/src/barback/transformer_isolate.dart
|
| similarity index 86%
|
| copy from sdk/lib/_internal/pub/lib/src/barback/transformer_isolate.dart
|
| copy to sdk/lib/_internal/pub_generated/lib/src/barback/transformer_isolate.dart
|
| index 65ba68f72ebe588c95c790b570093f8c6cfd97ba..04298d2be1fb066311f30868801f2e26bb699dcf 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/barback/transformer_isolate.dart
|
| +++ b/sdk/lib/_internal/pub_generated/lib/src/barback/transformer_isolate.dart
|
| @@ -50,8 +50,7 @@ class TransformerIsolate {
|
| /// exists. Otherwise, a snapshot of the isolate's code will be saved to that
|
| /// path once the isolate is loaded.
|
| static Future<TransformerIsolate> spawn(AssetEnvironment environment,
|
| - BarbackServer transformerServer, List<TransformerId> ids,
|
| - {String snapshot}) {
|
| + BarbackServer transformerServer, List<TransformerId> ids, {String snapshot}) {
|
| return mapFromIterableAsync(ids, value: (id) {
|
| return id.getAssetId(environment.barback);
|
| }).then((idsToAssetIds) {
|
| @@ -75,11 +74,11 @@ class TransformerIsolate {
|
| log.fine("Loading transformers from $ids");
|
|
|
| var port = new ReceivePort();
|
| - return dart.runInIsolate(code.toString(), port.sendPort,
|
| - packageRoot: baseUrl.resolve('packages'),
|
| - snapshot: snapshot)
|
| - .then((_) => port.first)
|
| - .then((sendPort) {
|
| + return dart.runInIsolate(
|
| + code.toString(),
|
| + port.sendPort,
|
| + packageRoot: baseUrl.resolve('packages'),
|
| + snapshot: snapshot).then((_) => port.first).then((sendPort) {
|
| return new TransformerIsolate._(sendPort, environment.mode, idsToUrls);
|
| }).catchError((error, stackTrace) {
|
| if (error is! CrossIsolateException) throw error;
|
| @@ -92,18 +91,17 @@ class TransformerIsolate {
|
| // The isolate error message contains the fully expanded path, not the
|
| // "package:" URI, so we have to be liberal in what we look for in the
|
| // error message.
|
| - var missingTransformer = idsToUrls.keys.firstWhere((id) =>
|
| - firstErrorLine.startsWith(
|
| - "Uncaught Error: Load Error: Failure getting ") &&
|
| - firstErrorLine.contains(idsToUrls[id].path),
|
| + var missingTransformer = idsToUrls.keys.firstWhere(
|
| + (id) =>
|
| + firstErrorLine.startsWith("Uncaught Error: Load Error: Failure getting ") &&
|
| + firstErrorLine.contains(idsToUrls[id].path),
|
| orElse: () => throw error);
|
| var packageUri = idToPackageUri(idsToAssetIds[missingTransformer]);
|
|
|
| // If there was an IsolateSpawnException and the import that actually
|
| // failed was the one we were loading transformers from, throw an
|
| // application exception with a more user-friendly message.
|
| - fail('Transformer library "$packageUri" not found.',
|
| - error, stackTrace);
|
| + fail('Transformer library "$packageUri" not found.', error, stackTrace);
|
| });
|
| });
|
| }
|
| @@ -122,8 +120,7 @@ class TransformerIsolate {
|
| 'configuration': JSON.encode(config.configuration)
|
| }).then((transformers) {
|
| transformers = transformers.map(
|
| - (transformer) => deserializeTransformerLike(transformer, config))
|
| - .toSet();
|
| + (transformer) => deserializeTransformerLike(transformer, config)).toSet();
|
| log.fine("Transformers from $config: $transformers");
|
| return transformers;
|
| }).catchError((error, stackTrace) {
|
| @@ -133,8 +130,8 @@ class TransformerIsolate {
|
| }
|
|
|
| /// An error thrown when a transformer fails to load.
|
| -class TransformerLoadError extends SourceSpanException
|
| - implements WrappedException {
|
| +class TransformerLoadError extends SourceSpanException implements
|
| + WrappedException {
|
| final CrossIsolateException innerError;
|
| Chain get innerChain => innerError.stackTrace;
|
|
|
|
|