/** * Configures and compiles all the modules (unless {@link Options#getNoPrecompile} is false). */ private static OutboxTable makeOutboxTable(Options options, TreeLogger logger, UnitCache unitCache, MinimalRebuildCacheManager minimalRebuildCacheManager) throws IOException, UnableToCompleteException { File workDir = ensureWorkDir(options); logger.log(Type.INFO, "workDir: " + workDir); LauncherDir launcherDir = LauncherDir.maybeCreate(options); int nextOutboxId = 1; OutboxTable outboxTable = new OutboxTable(); for (String moduleName : options.getModuleNames()) { OutboxDir outboxDir = OutboxDir.create(new File(workDir, moduleName), logger); Recompiler recompiler = new Recompiler(outboxDir, launcherDir, moduleName, options, unitCache, minimalRebuildCacheManager); // The id should be treated as an opaque string since we will change it again. // TODO: change outbox id to include binding properties. String outboxId = moduleName + "_" + nextOutboxId; nextOutboxId++; outboxTable.addOutbox(new Outbox(outboxId, recompiler, options, logger)); } return outboxTable; }
/** * Configures and compiles all the modules (unless {@link Options#getNoPrecompile} is false). */ private static OutboxTable makeOutboxes(Options options, TreeLogger logger, UnitCache unitCache, MinimalRebuildCacheManager minimalRebuildCacheManager) throws IOException, UnableToCompleteException { File workDir = ensureWorkDir(options); logger.log(Type.INFO, "workDir: " + workDir); LauncherDir launcherDir = LauncherDir.maybeCreate(options); int nextOutboxId = 1; OutboxTable outboxes = new OutboxTable(); for (String moduleName : options.getModuleNames()) { OutboxDir outboxDir = OutboxDir.create(new File(workDir, moduleName), logger); Recompiler recompiler = new Recompiler(outboxDir, launcherDir, moduleName, options, unitCache, minimalRebuildCacheManager); // The id should be treated as an opaque string since we will change it again. // TODO: change outbox id to include binding properties. String outboxId = moduleName + "_" + nextOutboxId; nextOutboxId++; outboxes.addOutbox(new Outbox(outboxId, recompiler, options, logger)); } return outboxes; }