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

Unified Diff: sdk/lib/_internal/pub/lib/src/entrypoint.dart

Issue 494943002: Don't load assets unnecessarily when precompiling executables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years, 4 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
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | sdk/lib/_internal/pub/lib/src/executable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
});
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | sdk/lib/_internal/pub/lib/src/executable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698