From 045432c974a4af8f47e132dd1e36bd5ffeb32de3 Mon Sep 17 00:00:00 2001 From: Artur Pata Date: Fri, 31 Oct 2025 09:57:18 +0200 Subject: [PATCH] Stop trying to compile detector and verifier on CE --- tracker/compiler/index.js | 15 +++++++++++---- tracker/compiler/variants.json | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tracker/compiler/index.js b/tracker/compiler/index.js index 7a7c67f53d9a..cb3341616f13 100644 --- a/tracker/compiler/index.js +++ b/tracker/compiler/index.js @@ -35,6 +35,12 @@ const ALL_VARIANTS = variantsFile.legacyVariants.concat( variantsFile.manualVariants ) +function shouldCompileVariant(variant) { + const IS_CE = ['ce', 'ce_test', 'ce_dev'].includes(process.env.MIX_ENV) + const shouldCompileVariant = IS_CE && variant.ee_only ? false : true + return shouldCompileVariant +} + export async function compileAll(options = {}) { if (process.env.NODE_ENV === 'dev' && canSkipCompile()) { console.info( @@ -46,16 +52,17 @@ export async function compileAll(options = {}) { const bundledCode = await bundleCode() const startTime = Date.now() - console.log(`Starting compilation of ${ALL_VARIANTS.length} variants...`) + const variantsToCompile = ALL_VARIANTS.filter(shouldCompileVariant) + console.log(`Starting compilation of ${variantsToCompile.length} variants...`) const bar = new progress.SingleBar( { clearOnComplete: true }, progress.Presets.shades_classic ) - bar.start(ALL_VARIANTS.length, 0) + bar.start(variantsToCompile.length, 0) const workerPool = Pool(() => spawn(new Worker('./worker-thread.js'))) - ALL_VARIANTS.forEach((variant) => { + variantsToCompile.forEach((variant) => { workerPool.queue(async (worker) => { await worker.compileFile(variant, { ...options, bundledCode }) bar.increment() @@ -67,7 +74,7 @@ export async function compileAll(options = {}) { bar.stop() console.log( - `Completed compilation of ${ALL_VARIANTS.length} variants in ${((Date.now() - startTime) / 1000).toFixed(2)}s` + `Completed compilation of ${variantsToCompile.length} variants in ${((Date.now() - startTime) / 1000).toFixed(2)}s` ) } diff --git a/tracker/compiler/variants.json b/tracker/compiler/variants.json index 9ffa4880a28b..75bed72fdf9b 100644 --- a/tracker/compiler/variants.json +++ b/tracker/compiler/variants.json @@ -32,12 +32,14 @@ "npm_package": "esm" }, { + "ee_only": true, "name": "detector.js", "entry_point": "installation_support/detector.js", "output_path": "priv/tracker/installation_support/detector.js", "globals": {} }, { + "ee_only": true, "name": "verifier.js", "entry_point": "installation_support/verifier.js", "output_path": "priv/tracker/installation_support/verifier.js",