From abd7bcd8b2d2e4688a5427278003dd6e1b255c3b Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Thu, 29 Sep 2022 14:49:41 -0400 Subject: [PATCH] Flow: remove max_workers setting (#25349) This was added back in #17880 to make CI pass for an unrelated change. This limits the max worker setting to CI environments as removing the setting completely still seems to break on CircleCI. --- scripts/flow/config/flowconfig | 2 +- scripts/flow/createFlowConfigs.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/flow/config/flowconfig b/scripts/flow/config/flowconfig index bdd313dbd5dd..0b94bb02fecb 100644 --- a/scripts/flow/config/flowconfig +++ b/scripts/flow/config/flowconfig @@ -39,7 +39,7 @@ untyped-type-import=error [options] -server.max_workers=4 +%CI_MAX_WORKERS% esproposal.class_static_fields=enable esproposal.class_instance_fields=enable esproposal.optional_chaining=enable diff --git a/scripts/flow/createFlowConfigs.js b/scripts/flow/createFlowConfigs.js index 62a54d11122a..a93cf1cef602 100644 --- a/scripts/flow/createFlowConfigs.js +++ b/scripts/flow/createFlowConfigs.js @@ -45,6 +45,11 @@ function writeConfig(renderer, rendererInfo, isServerSupported) { }); const config = configTemplate + .replace( + '%CI_MAX_WORKERS%\n', + // On CI, we seem to need to limit workers. + process.env.CI ? 'server.max_workers=4\n' : '', + ) .replace( '%REACT_RENDERER_FLOW_OPTIONS%', `