Warn on "pod install" with the new architecture disabled#300
Warn on "pod install" with the new architecture disabled#300kraenhansen merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a warning when React Native Node-API is used with the legacy architecture (when RCT_NEW_ARCH_ENABLED is set to '0'), helping developers identify configuration issues during the build process.
- Adds a warning check in the podspec to alert users when the new architecture is disabled
- Includes a changeset documenting this as a patch-level change
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/host/react-native-node-api.podspec |
Adds environment variable check and warning for legacy architecture usage |
.changeset/wicked-tables-deny.md |
Documents the change as a patch release with warning functionality |
| end | ||
|
|
||
| if ENV['RCT_NEW_ARCH_ENABLED'] == '0' | ||
| Pod::UI.warn "React Native Node-API doesn't support the legacy architecture (but RCT_NEW_ARCH_ENABLED == '0')" |
There was a problem hiding this comment.
[nitpick] The warning message could be clearer about the required action. Consider rephrasing to: 'React Native Node-API requires the new architecture. Please set RCT_NEW_ARCH_ENABLED=1 in your project configuration.'
| Pod::UI.warn "React Native Node-API doesn't support the legacy architecture (but RCT_NEW_ARCH_ENABLED == '0')" | |
| Pod::UI.warn "React Native Node-API requires the new architecture. Please set RCT_NEW_ARCH_ENABLED=1 in your project configuration." |
There was a problem hiding this comment.
I specifically wanted to use the "legacy architecture" in the naming, here - since the new architecture is now the default architecture.
This would have helped me debug an issue while building out #297.