From 01ea1feee03821002e42e58aaf6f8794dd7d39e7 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Tue, 1 Apr 2014 10:57:52 -0700 Subject: [PATCH] Remove direct deps from build id computation. We don't need the direct deps in the build id: if I'm a package and my direct dependencies change, then no one who depends on me has to rebuild. On the other hand, if my plugin's (transitive) dependencies change, then anyone who directly depends on me does need to rebuild because my plugins need to re-run. --- tools/unipackage.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/tools/unipackage.js b/tools/unipackage.js index 6cbf076d2b..b6d97fe71a 100644 --- a/tools/unipackage.js +++ b/tools/unipackage.js @@ -890,21 +890,9 @@ _.extend(Unipackage.prototype, { // existing version has a build identifier already. addBuildIdentifierToVersion: function () { var self = this; - // Gather all the dependencies' versions and organize them into - // arrays. We use arrays to avoid relying on the order of + // Gather all the plugin dependencies' versions and organize them + // into arrays. We use arrays to avoid relying on the order of // stringified object keys. - var directDeps = []; - _.each( - self._buildTimeDirectDependenciesWithBuildIds(), - function (version, packageName) { - directDeps.push([packageName, version]); - } - ); - - // Sort direct dependencies by package name (which is the "0" property - // of each element in the array). - directDeps = _.sortBy(directDeps, "0"); - var pluginDeps = []; _.each( self._buildTimePluginDependenciesWithBuildIds(), @@ -935,7 +923,6 @@ _.extend(Unipackage.prototype, { // Stick all our info into one big array, stringify it, and hash it. var buildIdInfo = [ - directDeps, pluginDeps, watchFiles ];