| Index: sdk/lib/_internal/pub/lib/src/entrypoint.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/entrypoint.dart b/sdk/lib/_internal/pub/lib/src/entrypoint.dart
|
| index 30d29549af957c5aaf14f285cb19300fef0a1b28..25bb14f1d3222eabfde2f4cc35f2584d01bab7bd 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/entrypoint.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/entrypoint.dart
|
| @@ -190,15 +190,18 @@ class Entrypoint {
|
| if (executables.isEmpty) return null;
|
|
|
| return log.progress("Precompiling executables", () {
|
| - // TODO(nweiz): Only add assets touchable by the executables we're
|
| - // precompiling.
|
| ensureDir(binDir);
|
|
|
| // Make sure there's a trailing newline so our version file matches the
|
| // SDK's.
|
| writeTextFile(sdkVersionPath, "${sdk.version}\n");
|
| +
|
| + var packagesToLoad =
|
| + unionAll(executables.keys.map(graph.transitiveDependencies))
|
| + .map((package) => package.name).toSet();
|
| return AssetEnvironment.create(this, BarbackMode.RELEASE,
|
| - WatcherType.NONE, useDart2JS: false).then((environment) {
|
| + packages: packagesToLoad,
|
| + useDart2JS: false).then((environment) {
|
| environment.barback.errors.listen((error) {
|
| log.error(log.red("Build error:\n$error"));
|
| });
|
|
|