From c3149f22a0ca9cb445518a393a301ffa85c669df Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Wed, 10 Sep 2025 05:24:28 -0700 Subject: [PATCH] Remove outdated artifacts codegen early return (#53690) Summary: Follow-up to https://github.com/facebook/react-native/issues/53503 for a regression When no React Native module is present this bail condition stops us from generating the artifacts podspec that's needed to complete build. ## Changelog: [IOS] [FIXED] - Fix regression that skips artifacts code generation Pull Request resolved: https://github.com/facebook/react-native/pull/53690 Test Plan: - Create an app **without** any React Native modules, run `pod install`; without this fix the podspec will be missing and the build will fail - With expo this can be reproduced using `create-expo-app --template blank-typescript@next` on `react-native@0.81.2` - With the community CLI this can be reproduced using `npx react-native-community/cli@latest init test --skip-install --version 0.81.2` and uninstalling `react-native-safe-area-context` Reviewed By: javache Differential Revision: D82103491 Pulled By: cipolleschi fbshipit-source-id: 3d9619b5a935ca920220824b3963a9a107f926ca --- .../scripts/codegen/generate-artifacts-executor/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/react-native/scripts/codegen/generate-artifacts-executor/index.js b/packages/react-native/scripts/codegen/generate-artifacts-executor/index.js index a3c52e39f38..c64c256a459 100644 --- a/packages/react-native/scripts/codegen/generate-artifacts-executor/index.js +++ b/packages/react-native/scripts/codegen/generate-artifacts-executor/index.js @@ -99,7 +99,6 @@ function execute( if (codegenEnabledLibraries.length === 0) { codegenLog('No codegen-enabled libraries found.', true); - return; } let platforms = @@ -114,10 +113,6 @@ function execute( ({name}) => !disabledLibraries.includes(name), ); - if (!libraries.length) { - continue; - } - const outputPath = computeOutputPath( projectRoot, baseOutputPath,