Skip to content

Commit

Permalink
Fix Typo and skip generation of app-specific component registration (#…
Browse files Browse the repository at this point in the history
…47547)

Summary:
Pull Request resolved: #47547

In [#47176](#47176) we disabled the generation of the component registration for app specific components as it was creating a circular dependency between the app and React Native.

However, we made a couple of typos that make it not work as expected and users picked up those typos soon.

This change fixes them for good.

## Changelog
[iOS][Fixed] - Properly stop generating component registration for components defined in app.

Reviewed By: blakef

Differential Revision: D65750433

fbshipit-source-id: 1a879c5be014905558b9fd05e6f16ac36b784ed6
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Nov 11, 2024
1 parent 9db2883 commit 97a4234
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ function rootCodegenTargetNeedsThirdPartyComponentProvider(pkgJson, platform) {
function dependencyNeedsThirdPartyComponentProvider(
schemaInfo,
platform,
appCondegenConfigSpec,
appCodegenConfigSpec,
) {
// Filter the react native core library out.
// In the future, core library and third party library should
Expand All @@ -559,7 +559,7 @@ function dependencyNeedsThirdPartyComponentProvider(
// the symbols defined in the app.
return (
!isReactNativeCoreLibrary(schemaInfo.library.config.name, platform) &&
schemaInfo.library.config.name !== appCondegenConfigSpec
schemaInfo.library.config.name !== appCodegenConfigSpec
);
}

Expand Down Expand Up @@ -792,7 +792,7 @@ function execute(projectRoot, targetPlatform, baseOutputPath) {
dependencyNeedsThirdPartyComponentProvider(
schemaInfo,
platform,
pkgJson.codegenConfig?.appCondegenConfigSpec,
pkgJson.codegenConfig?.name,
),
);
const schemas = filteredSchemas.map(schemaInfo => schemaInfo.schema);
Expand Down

0 comments on commit 97a4234

Please sign in to comment.