diff --git a/tools/packages.js b/tools/packages.js index a5fde5c352..9702c4bbcb 100644 --- a/tools/packages.js +++ b/tools/packages.js @@ -1754,8 +1754,8 @@ _.extend(Package.prototype, { _.each(["client", "server"], function (sliceName) { // Determine used packages -// var names = project.getAllDependencies(appDir); var names = project.getPackages(appDir); + var vers = project.getAllDependencies(appDir); var arch = sliceName === "server" ? "os" : "browser"; @@ -1763,13 +1763,16 @@ _.extend(Package.prototype, { // instead of an override. names = _.map(names, function(name) { var narr = name.split("@="); - if (narr.length === 2) { - var newPath = tropohouse.packagePath(narr[0], narr[1]); - self.library.override(narr[0], newPath); - } return narr[0]; }); + vers = _.map(vers, function(name) { + var newPath = tropohouse.packagePath(name.packageName, name.versionConstraint, "browser+os"); + self.library.override(name.packageName, newPath); + return name.packageName; + }); + + names = _.union(names, vers); // Create slice var slice = new Slice(self, { name: sliceName, diff --git a/tools/tropohouse.js b/tools/tropohouse.js index 246fcff7f0..bfb56d3fb9 100644 --- a/tools/tropohouse.js +++ b/tools/tropohouse.js @@ -54,9 +54,9 @@ tropohouse.downloadedBuilds = function (packageName, version) { tropohouse.downloadedBuildsDirectory(packageName, version)); }; -tropohouse.packagePath = function (packageName, version) { +tropohouse.packagePath = function (packageName, version, arch) { return path.join(tropohouse.getWarehouseDir(), "packages", packageName, - version); + version, arch); }; tropohouse.downloadSpecifiedBuild = function (buildRecord) { diff --git a/tools/watch.js b/tools/watch.js index a66d265be9..a88e9c8742 100644 --- a/tools/watch.js +++ b/tools/watch.js @@ -99,7 +99,10 @@ _.extend(WatchSet.prototype, { if (self.files[filePath] === hash) return; // Nope, inconsistent. - self.alwaysFire = true; + console.log(filePath, hash, self.files[filePath]); + self.files[filePath] = hash; + + // self.alwaysFire = true; return; } self.files[filePath] = hash; @@ -135,9 +138,9 @@ _.extend(WatchSet.prototype, { self.alwaysFire = true; return; } - _.each(other.files, function (hash, name) { - self.addFile(name, hash); - }); +// _.each(other.files, function (hash, name) { +// self.addFile(name, hash); +// }); _.each(other.directories, function (dir) { // XXX this doesn't deep-clone the directory, but I think these objects // are never mutated