-
Notifications
You must be signed in to change notification settings - Fork 744
Description
Currently, tools like expo-doctor use React Native Directory to check for New Architecture (Fabric) compatibility. However, the existing flags ("newArch": true/false) are binary and don't capture the nuance of which version of a library introduced New Architecture support.
This leads to a situation where a developer can be using a version of a library that does not support the New Architecture, while a newer version does. expo-doctor may not flag this, because the directory simply marks the library as compatible ("newArch": true), without any version context.
For example, our project is using @intercom/intercom-react-native: ^8.1.0 with the New Architecture enabled. This version is not compatible, but because a later version (9.0.0-beta.2) is compatible, the directory doesn't catch the issue. This results in potential runtime errors that are difficult to diagnose.
Describe the solution you'd like
I propose adding a new, optional field to the react-native-libraries.json schema: newArchIntroducedIn.
This field would be a string representing the semantic version number where New Architecture support was first introduced.
Example of the proposed JSON structure change:
{
"githubUrl": "https://github.com/intercom/intercom-react-native",
"ios": true,
"android": true,
"expoGo": false,
"web": false,
"windows": false,
"macos": false,
"newArch": true,
"newArchIntroducedIn": "9.0.0-beta.2", // <-- Proposed new field
"npmPkg": "@intercom/intercom-react-native",
"unmaintained": false
// ... rest of the fields
}Describe alternatives you've considered
The alternative is to manually track this information, which is what we are currently doing. We've used package.json's resolutions field to enforce a minimum version, but this is a project-specific workaround and doesn't solve the problem for the wider community.
Additional context
By adding this field, tooling like expo-doctor could be updated to perform more intelligent checks. For example, it could compare the version specified in a project's package.json against the newArchIntroducedIn value. If the project's version is lower, it could provide a specific, actionable warning:
"Warning:
@intercom/intercom-react-nativesupports the New Architecture starting from version9.0.0-beta.2, but your project is using8.1.0."
This would be a massive improvement to the developer experience and would make the transition to the New Architecture much smoother for the entire community.
Thank you for considering this proposal!