drop noSources field

This was a workaround a while ago for back when the uniload build
process was less principled. It's fine now.
This commit is contained in:
David Glasser
2014-11-22 14:27:32 -08:00
parent dddf0b246e
commit cd625a3795
2 changed files with 18 additions and 42 deletions

View File

@@ -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);

View File

@@ -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())