From cd625a3795dca96846ca633744bd463d779ca667 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Sat, 22 Nov 2014 14:27:32 -0800 Subject: [PATCH] drop noSources field This was a workaround a while ago for back when the uniload build process was less principled. It's fine now. --- tools/compiler.js | 44 +++++++++++++++++------------------------ tools/package-source.js | 16 --------------- 2 files changed, 18 insertions(+), 42 deletions(-) diff --git a/tools/compiler.js b/tools/compiler.js index f968680e5b..c1d5d9e478 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -181,38 +181,30 @@ var compileUnibuild = function (options) { // skip unordered dependencies, because it's not going to work to // have circular build-time dependencies. // - // Note that we avoid even calling containsPlugins if we know there are no - // sources; specifically, this avoids calling containsPlugins in the - // isopacket-building case because in that case we might not know how to check - // to see if a package has plugins. (It's possible that this check is no - // longer necessary.) - // // eachUsedUnibuild takes care of pulling in implied dependencies for us (eg, // templating from standard-app-packages). // // We pass archinfo.host here, not self.arch, because it may be more specific, // and because plugins always have to run on the host architecture. - if (!inputSourceArch.noSources) { - // XXX we could do this just using the catalog too? - compiler.eachUsedUnibuild({ - dependencies: inputSourceArch.uses, - arch: archinfo.host(), - isopackCache: isopackCache, - skipUnordered: true - }, function (unibuild) { - if (unibuild.pkg.name === isopk.name) - return; - pluginProviderPackageNames[unibuild.pkg.name] = true; - // If other package is built from source, then we need to rebuild this - // package if any file in the other package that could define a plugin - // changes. - watchSet.merge(unibuild.pkg.pluginWatchSet); + compiler.eachUsedUnibuild({ + dependencies: inputSourceArch.uses, + arch: archinfo.host(), + isopackCache: isopackCache, + skipUnordered: true + // implicitly skip weak deps by not specifying acceptableWeakPackages option + }, function (unibuild) { + if (unibuild.pkg.name === isopk.name) + return; + pluginProviderPackageNames[unibuild.pkg.name] = true; + // If other package is built from source, then we need to rebuild this + // package if any file in the other package that could define a plugin + // changes. + watchSet.merge(unibuild.pkg.pluginWatchSet); - if (_.isEmpty(unibuild.pkg.plugins)) - return; - activePluginPackages.push(unibuild.pkg); - }); - } + if (_.isEmpty(unibuild.pkg.plugins)) + return; + activePluginPackages.push(unibuild.pkg); + }); activePluginPackages = _.uniq(activePluginPackages); diff --git a/tools/package-source.js b/tools/package-source.js index 83e3ccaf4d..ba5f317efe 100644 --- a/tools/package-source.js +++ b/tools/package-source.js @@ -184,9 +184,6 @@ var SourceArch = function (pkg, options) { // but only control files such as package.js and .meteor/packages, // since the rest are not determined until compile time. self.watchSet = options.watchSet || new watch.WatchSet; - - // See the field of the same name in PackageSource. - self.noSources = false; }; /////////////////////////////////////////////////////////////////////////////// @@ -289,14 +286,6 @@ var PackageSource = function (catalog) { // built copies of all known isopackets. self.includeTool = false; - // If this is true, then this package has no source files. (But the converse - // is not true: this is only set to true by one particular constructor.) This - // is specifically so that a few pieces of code can detect the wrapper "load" - // package that isopacket building uses and not do extra work that doesn't - // make sense in the isopacket-building context. - // XXX This may no longer be necessary. - self.noSources = false; - // If this is true, the package source comes from the package server, and // should be treated as immutable. The only reason that we have it is so we // can build it, and we should expect to use exactly the same inputs @@ -389,11 +378,6 @@ _.extend(PackageSource.prototype, { nodeModulesPath: nodeModulesPath }); - if (!sources.length) { - self.noSources = true; - sourceArch.noSources = true; - } - self.architectures.push(sourceArch); if (! self._checkCrossUnibuildVersionConstraints())