-
Notifications
You must be signed in to change notification settings - Fork 7
Copy TurboModule and test app from POC branch #6
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
Conversation
constexpr variable 'kModuleName' must be initialized by a constant expression
|
| PATCHED_HERMES_DIR = File.join(__dir__, "../hermes") | ||
| unless Dir.exist?(PATCHED_HERMES_DIR) | ||
| sleep 1 | ||
| # Cloning (advice.detachedHead=false for a pretty output) | ||
| system("git clone -c advice.detachedHead=false --recursive --depth 1 --branch node-api-for-react-native-0.79.0 https://github.com/kraenhansen/hermes.git #{PATCHED_HERMES_DIR}") | ||
| # Patch React Native's copy of JSI | ||
| system("cp -rf #{PATCHED_HERMES_DIR}/API/jsi/jsi/ #{REACT_NATIVE_DIR}/ReactCommon/jsi/jsi/") | ||
| end |
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.
Instead of the test app cloning the Hermes repo, this is an attempt to drive the patching of Hermes from the "host" package.
This is not the ideal long-term solution, but it's needed until the Hermes branch merge upstream.
| "eslint": "^9.19.0", | ||
| "react-native": "0.77.0", | ||
| "globals": "^16.0.0", | ||
| "react-native": "0.79.1", |
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.
This PR is upgrading to the latest React Native too.
| // TODO: Read the version from the addon | ||
| // @see | ||
| // https://github.com/callstackincubator/react-native-node-api-modules/issues/4 | ||
| napi_env env = reinterpret_cast<napi_env>(rt.createNodeApiEnv(8)); |
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.
This is using the new createNodeApiEnv method.
This PR copies code from the POC branch into the existing structure with the least dependencies and configuration necessary.