-
Notifications
You must be signed in to change notification settings - Fork 559
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
[ISSUE_5032][ANDROID] fix Error: Missing Realm constructor. When New Architecture is enabled #5683
Conversation
*fix Error: Missing Realm constructor. When New Architecture is enabled
Realm welcomes all contributions! The only requirement we have is that, like many other projects, we need to have a Contributor License Agreement (CLA) in place before we can accept any external code. Our own CLA is a modified version of the Apache Software Foundation’s CLA. Our records show that CLA has not been signed by @zabutok. Please submit your CLA electronically using our Google form so we can accept your submissions. After signing the CLA you can recheck this PR with a |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
Thanks for your contribution. We want to support building with the new architecture enabled, but we also want to support building with it disabled. Specifically I want us to adopt the multi sourceset approach outlined in this tutorial: https://github.com/react-native-community/RNNewArchitectureLibraries/tree/feat/back-turbomodule#android-sourceset I suppose a follow-up question is: Does this support both new architecture enabled and disabled? |
@kraenhansen From my side I can confirm what is works for both flags when architecture enabled and disabled. Also I am not so good in new realm implementation but as I can understood realm can't be used without turbo modules with Hermes. At least it is not so easy. In my own project it works for both implementation. |
Class<? extends NativeModule>[] moduleList = | ||
new Class[] { | ||
RealmReactModule.class, RealmReactModule.class, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a bit complicated to use an array and loop, since we only have one module class? Is this code copied from somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not copied but i was trying to reproduce react-native-reanimated
implementation because their implementation works pretty well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually yes I think I can simplify it
I've verified this works both with the new architecture enabled and disabled. |
We just released this as v12.0.0-alpha.2. |
What, How & Why?
This closes #5032.
☑️ ToDos