Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Codegen] Exclude unlinked libs from codegen #47712

Open
wants to merge 1 commit into
base: 0.76-stable
Choose a base branch
from

Conversation

cipolleschi
Copy link
Contributor

@cipolleschi cipolleschi commented Nov 19, 2024

Summary:

There is a case where a library is added for a specific platform and unlinked for another platform, because perhaps we would like to use a different library.

The way in which this is implemented is through the react-native.config.js file, by setting a specific platform to null.

Currently, Codegen ignore this information and generates the code for all the libraries it can find, including the unlinked ones. This can result in build failures because there are some functions prototype defined with no implementation.

This change takes thos libraries into account and it should fix: #47550.

Note

Codegen changed in 0.77, so we don't need to backport this to main

Changelog:

[General][Changed] - Stop generating code for unlinked libraries

Test Plan:

Tested in a new app created with 0.76.2, following the repro steps in #47550

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Nov 19, 2024
@cipolleschi cipolleschi changed the base branch from main to 0.76-stable November 19, 2024 14:29
@cipolleschi cipolleschi marked this pull request as ready for review November 19, 2024 14:32
@cipolleschi cipolleschi changed the title cipolleschi/exclude unlinked libs from codegen [Codegen] Exclude unlinked libs from codegen Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner Pick Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants