()
| 234 | |
| 235 | // Returns a new all-local-packages catalog to be used for building isopackets. |
| 236 | var newIsopacketBuildingCatalog = function () { |
| 237 | if (! files.inCheckout()) { |
| 238 | throw Error("No need to build isopackets unless in checkout!"); |
| 239 | } |
| 240 | |
| 241 | var catalogLocal = require('../packaging/catalog/catalog-local.js'); |
| 242 | var isopacketCatalog = new catalogLocal.LocalCatalog; |
| 243 | var messages = buildmessage.capture( |
| 244 | { title: "scanning local core packages" }, |
| 245 | function () { |
| 246 | const packagesDir = |
| 247 | files.pathJoin(files.getCurrentToolsDir(), 'packages'); |
| 248 | |
| 249 | // When running from a checkout, isopacket building does use local |
| 250 | // packages, but *ONLY THOSE FROM THE CHECKOUT*: not app packages or |
| 251 | // $PACKAGE_DIRS packages. One side effect of this: we really really |
| 252 | // expect them to all build, and we're fine with dying if they don't |
| 253 | // (there's no worries about needing to springboard). |
| 254 | isopacketCatalog.initialize({ |
| 255 | localPackageSearchDirs: [ |
| 256 | packagesDir, |
| 257 | files.pathJoin(packagesDir, "non-core", "*", "packages"), |
| 258 | ], |
| 259 | buildingIsopackets: true |
| 260 | }); |
| 261 | }); |
| 262 | if (messages.hasMessages()) { |
| 263 | Console.arrowError("Errors while scanning core packages:"); |
| 264 | Console.printMessages(messages); |
| 265 | throw new Error("isopacket scan failed?"); |
| 266 | } |
| 267 | return isopacketCatalog; |
| 268 | }; |
| 269 | |
| 270 | export function makeIsopacketBuildContext() { |
| 271 | var context = {}; |
no test coverage detected
searching dependent graphs…