-
Notifications
You must be signed in to change notification settings - Fork 99
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
Use align-deps to help migrate apps to the New Architecture #1863
Comments
We can probably use the list in reactwg/react-native-new-architecture#6 as a starting point. |
I have a draft PR with only these packages. The rest are |
I think this would be an amazing addition to the New Architecture migration story. As for the technical side: we don't have a simple way to know if a library is New Architecture compatible. In general, relying on |
Is Reanimated isn't listed here because New Arch support is still in RC. |
As mentioned above, not always. There might be packages without |
This conversation I think is very close to what the RNDirectory is trying to achieve through this: react-native-community/directory#870 cc @Simek It'd be great to decide a standard way to communicate new arch support, and then "enforce it" by having both dep-check and directory leverage it as the official way. At that point we can communicate in all the 3 places (dep-check, RN docs website, RNDirectory) that doing "XXX" is the one way. |
I've been wondering if it makes more sense for each package to add a field that signals their new-arch readiness. It would allow cli to warn when autolinking, dep-check/directory to generate the compat table, and docs to be automatically updated. Edit: The field does not need to be binary, it could signal compatibility, e.g. "ready" -> works fine as-is, "full" -> codegen and extra steps to ensure better experience. |
Yup that's a good thing to add. Do you have any suggestion (I assume it's going to be stored inside the |
I think |
@cortinico @tido64 Small input on using For an upcoming feature in Metro (
Therefore if we are looking to introduce new explicit key(s) for this feature, it might sit well grouped under this: {
"name": "my-package",
"react-native-config": {
"metro-exports-mode": "strict",
"new-arch-support": "ready"
}
} Edit: Renamed overloaded |
@huntie: Yes, I think adding a new field like you described makes the most sense. It would allow for future expansions. If we're all agreeing on this approach, what would be the next steps? In my mind, I'm thinking we should at least start with:
Unrelated: Would it also make sense to move |
cc @brentvatne in case you have better ideas or feedback on this. |
Another interesting bit I discovered today: Even with Which brings me back to this:
I'd love to hear what people think should be the way forward. |
That's what I mentioned before. We need an explicit field to mention that the New Architecture is supported. Is this the preferred approach then? nit:
Potentially yes. Yet please note that both Gradle and CocoaPods are parsing the package.json. Moving things inside a Also speaking with @cipolleschi, we were brainstorming about having a single variable |
I'm not a fan of mixing cases either. We should probably use camelCase (i.e.
I meant the |
gentle nudge to the thread: @huntie how is the work on the export feature? Have you decided on the package.json field name? |
@kelset Very close to publishing, will include the Standardising on camel case throughout makes sense. The RFC will contain a new proposed key for package.json, "reactNative": {
"metroExportsMode": "strict",
"newArchSupport": "ready"
} With this casing change, we can end up keeping a simple and wide name to group these React Native config options and/or future metadata. The downside here is the chance of confusion with the existing key. |
I guess we can then bring over the conversation about the name of the config to the RFC once it's up. Not a big fun of having "react-native" and "reactNative" be two totally different things. |
Hey folks; just wanted to follow up here now that thanks to @huntie and the rest of the Metro team it seems that the exports support is going ahead and the definition of If I'm understanding correctly, it means that "react-native-config": {
"custom-setting": "entry",
...
},
"dependencies": {
// etc etc Right? On top of this, I wanted to also check in into an idea that the developers from InfiniteRed brought to us for indicating via
What do you think? I think this might help and also we could potentially "mirror" this into the RNDirectory website too. |
Clarifying: The The impact is the same, however (and the Metro exports spec no longer depends on this decision)! We need a different root field name to |
Totally, thanks for the clarification @huntie - we did a meeting earlier this week with @motiz88 and Blake and other Meta folks, I'm guessing the next step is to understand how we want to go ahead with this. My current latest understanding is that internally during planning you will decide how you want to go ahead with this in H123 and then we can create some actionables. |
Reviving this thread one more time, since now we should all be approaching clarity over how the next few months would look like. I feel that the next step would be to get a few folks in a room and make sure that we can reach an agreement on the final "spec" for this new I'd like to get a few folks in a room to discuss details and after that, setup a "final" RFC for how to approach so that we can coordinate the needed work. As attendees, I'm thinking some representatives from CLI, Expo, Metro and rnx-kit, keeping the number of people below 10. |
quick update: we are now working on said configuration standard, read more here: react-native-community/discussions-and-proposals#588 |
headsup: we are still blocked on this waiting on the RFC to make progress: react-native-community/discussions-and-proposals#588 AFAIK it will be actually get closed in favour of a 3.0 rewrite as a separate PR; I'll post an update once it's there. |
An update on this: since the last time we talked about this, there have been a couple of relevant updates:
So devs at this point in time have a pretty decent level of support in migrating their apps to the new arch. Because of this, we think we can close this off. Let us know if you have other thoughts on the matter. |
For app maintainers to migrate to the New Architecture, all of their native dependencies must support the New Architecture as well. This isn't the same as being merely compatible with some React Native version 0.x, since (for the time being) the New Architecture is opt-in.
A problem that has come up is that it's not easy to know ahead of time, as an app maintainer, whether all of your dependencies have new versions available that are compatible with the New Architecture. In the worst case, you might sink time and effort into beginning an upgrade, only to get blocked halfway by some third-party library and have to abandon the effort for an unknown length of time.
The idea here would be to add information to
align-deps
's database about various common libraries' New Architecture readiness, such that (ideally) we can recommendalign-deps
as part of the official New Architecture migration guide for app maintainers. In doing this, we want to (1) increase the likelihood of apps migrating successfully on the first try, (2) create visibility in the ecosystem (and thus momentum and excitement) around popular libraries migrating to the New Architecture.There are some questions around how we source this information reliably at scale (e.g. combine efforts with https://reactnative.directory/ ?), but in the short term leveraging
align-deps
's standalone database of packages seems like a good way to jumpstart this capability for relatively low effort.NOTE: I'm only lightly familiar with
align-deps
and the New Architecture, so I've kept this super high-level and am not opinionated on the details.cc @cortinico @tido64 @afoxman @huntie @cipolleschi
update by @kelset: changed dep-check to align-deps ;)
The text was updated successfully, but these errors were encountered: