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-native supports the New Architecture starting from version 9.0.0-beta.2, but your project is using 8.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!
Currently, tools like
expo-doctoruse 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-doctormay 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.0with 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.jsonschema: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'sresolutionsfield 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-doctorcould be updated to perform more intelligent checks. For example, it could compare the version specified in a project'spackage.jsonagainst thenewArchIntroducedInvalue. If the project's version is lower, it could provide a specific, actionable warning: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!