-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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 page lacks info and is confusing #4460
Comments
The other problem I have is now, the instructions to disable this read:
Uhm... update to what exactly? What do I need to put on |
Thanks for reporting this @ospfranco - This was briefly discussed offline. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I have a RN library that was shipping the generated artifacts using RN 0.76. When I tried to add it to a RN 75 I started getting this compilation error:
This is confusing as it is on the generated code. I stumbled for hours trying to re-generate everything but nothing helped. I then tried to update the app to 76 and it magically started working. I tried to revert back to 75 but it kept working.
I then started googling trying to see if the problem was my package and gratuitously landed on this page
https://reactnative.dev/docs/the-new-architecture/codegen-cli#including-generated-code-into-libraries
It finally dawned on me I had the
"includesGeneratedCode": true
set. This is the default used by react-native-builder-bob. So, I was shipping the generated code which, contrary to what's described on that page, it cannot be true to be guaranteed stable across RN versions. What's the entire point of codegen if it will be generated against one specific version?!I'm on the process of disabling the flag and shipping only the source files so codegen happens on build time of the app but I'm just trying to understand if I'm holding it wrong or what's mentioned on the page is just not true
I don't know if you can confidently ship this feature. I know it's not necessarily fault of the codegen cli but rather the template but at least to me it seems stability across versions CANNOT be guaranteed, right?
The text was updated successfully, but these errors were encountered: