diff --git a/tools/catalog.js b/tools/catalog.js index 29d52279fd..ef40c90f87 100644 --- a/tools/catalog.js +++ b/tools/catalog.js @@ -678,7 +678,9 @@ _.extend(CompleteCatalog.prototype, { title: "building package `" + name + "`", rootPath: sourcePath }, function () { - unip = compiler.compile(self.packageSources[name]).unipackage; + unip = compiler.compile(self.packageSources[name], { + ignoreProjectDeps: constraintSolverOpts.ignoreProjectDeps + }).unipackage; if (! buildmessage.jobHasMessages()) { // Save the build, for a fast load next time try { diff --git a/tools/compiler.js b/tools/compiler.js index c9642c3228..74ae1b4e43 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -730,6 +730,8 @@ var compileUnibuild = function (unipackage, inputSourceArch, packageLoader, // when we already have a resolved set of build-time dependencies and // want to use that instead of resolving them again, e.g. when // running 'meteor publish-for-arch'. +// - ignoreProjectDeps: if we should, in some specific context that +// glasser only half understands, ignore the current project deps // // Returns an object with keys: // - unipackage: the built Unipackage @@ -745,7 +747,9 @@ compiler.compile = function (packageSource, options) { options = _.extend({ officialBuild: false }, options); // Determine versions of build-time dependencies - var buildTimeDeps = determineBuildTimeDependencies(packageSource); + var buildTimeDeps = determineBuildTimeDependencies(packageSource, { + ignoreProjectDeps: options.ignoreProjectDeps + }); // Build plugins _.each(packageSource.pluginInfo, function (info) { @@ -834,7 +838,10 @@ compiler.compile = function (packageSource, options) { // Compile unibuilds. Might use our plugins, so needs to happen second. var loader = new packageLoader.PackageLoader({ - versions: buildTimeDeps.packageDependencies + versions: buildTimeDeps.packageDependencies, + constraintSolverOpts: { + ignoreProjectDeps: options.ignoreProjectDeps + } }); _.each(packageSource.architectures, function (unibuild) { diff --git a/tools/package-cache.js b/tools/package-cache.js index 0e48428d9c..c8ae60e48c 100644 --- a/tools/package-cache.js +++ b/tools/package-cache.js @@ -69,7 +69,7 @@ _.extend(PackageCache.prototype, { // on disk, you won't see the changes. To flush the package cache // and force all of the packages to be reloaded the next time // loadPackageAtPath() is called for them, see refresh(). - loadPackageAtPath: function (name, loadPath) { + loadPackageAtPath: function (name, loadPath, constraintSolverOpts) { var self = this; buildmessage.assertInCapture(); @@ -179,7 +179,9 @@ _.extend(PackageCache.prototype, { // We don't do that anymore and at the moment, we rely on catalog to // initalize ahead of us and swoop in and build all of the local packages // informed by a topological sort - var unip = compiler.compile(packageSource).unipackage; + var unip = compiler.compile(packageSource, { + ignoreProjectDeps: constraintSolverOpts.ignoreProjectDeps + }).unipackage; self.loadedPackages[key] = { pkg: unip, sourceDir: null, diff --git a/tools/package-loader.js b/tools/package-loader.js index 1d20b4ae6d..3a25350660 100644 --- a/tools/package-loader.js +++ b/tools/package-loader.js @@ -17,7 +17,7 @@ exports.PackageLoader = function (options) { var self = this; self.versions = options.versions || null; self.uniloadDir = options.uniloadDir; - self.constraintSolverOpts= options.constraintSolverOpts; + self.constraintSolverOpts = options.constraintSolverOpts; }; _.extend(exports.PackageLoader.prototype, { @@ -53,7 +53,8 @@ _.extend(exports.PackageLoader.prototype, { return pkg; } - return packageCache.packageCache.loadPackageAtPath(name, loadPath); + return packageCache.packageCache.loadPackageAtPath( + name, loadPath, self.constraintSolverOpts); }, containsPlugins: function (name) {