Skip to content
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

React Native 0.69.4 Upgrade #5193

Merged
merged 14 commits into from
Dec 2, 2022
Merged

React Native 0.69.4 Upgrade #5193

merged 14 commits into from
Dec 2, 2022

Conversation

geriux
Copy link
Contributor

@geriux geriux commented Oct 5, 2022

This PR adds support for React Native 0.69.4

The main changes are:

  • Updating bin/generate-podspecs.sh to support the new changes like Hermes being bundled with the React Native library.
  • Updating the script for bundle:android:bytecode since the path for Hermes changed.
  • Add a new clean:gutenberg:distclean postinstall script to clean up node_modules in Gutenberg since it was generating a conflict issue with multiple versions of React. There will be a follow-up ticket to investigate this further so we can remove this extra step.
  • Updates the third-party podspecs.

Related PRs

Feature branch

Android integration

iOS integration

To test:

  • CI checks must pass
  • Manual testing was done internally

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Oct 5, 2022

Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job!

@@ -54,7 +54,7 @@
"metro-resolver": "^0.70.3"
},
"scripts": {
"postinstall": "patch-package && npm ci --prefix gutenberg && npm run i18n:check-cache && ./bin/install-jetpack.sh",
"postinstall": "patch-package && npm run clean:gutenberg:distclean && npm ci --prefix gutenberg && npm run i18n:check-cache && ./bin/install-jetpack.sh",
Copy link
Contributor

@fluiddot fluiddot Oct 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it's necessary cleaning up Gutenberg on every dependency install 🤔. I noticed in the package-lock.json that the react dependency has been updated to 18 (reference), shouldn't that be enough to install the correct versions of the dependencies under Gutenberg?

My main concern about this workaround is that I understand that it will increase severely the duration of the dependencies install command, do we know roughly how much time we expect that to be increased?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there, sorry for taking a bit to reply to this comment 😅

shouldn't that be enough to install the correct versions of the dependencies under Gutenberg?

It looks like we have other dependencies that still use React 17 and it's causing conflicts with the dependencies and the editor.

My main concern about this workaround is that I understand that it will increase severely the duration of the dependencies install command, do we know roughly how much time we expect that to be increased?

What do you mean by: it will increase severely? That new step we are adding it's just removing any dependencies that might have been installed in Gutenberg when we run npm install in Gutenberg mobile before running npm ci. It's just a few seconds while it removes all of the node_module folders within Gutenberg that might have com from running npm install from the parent folder. From all of the tests I've done while working with the upgrade, it doesn't take more than a few seconds.

We could add a follow-up task to investigate further the dependencies we have to avoid this workaround.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we have other dependencies that still use React 17 and it's causing conflicts with the dependencies and the editor.

Ah, interesting. Do we know which dependencies are still using React 17?

On the other hand, do we need to run npm run clean:gutenberg:distclean everytime or is this a one-off?

What do you mean by: it will increase severely? That new step we are adding it's just removing any dependencies that might have been installed in Gutenberg when we run npm install in Gutenberg mobile before running npm ci. It's just a few seconds while it removes all of the node_module folders within Gutenberg that might have com from running npm install from the parent folder. From all of the tests I've done while working with the upgrade, it doesn't take more than a few seconds.

Ah, ok, my concern came because I thought that cleaning Gutenberg would increase the duration of the npm ci --prefix gutenberg command. In case it's just adding a few seconds then it's ok to continue with this workaround. Thanks for elaborating on this 🙇 !

We could add a follow-up task to investigate further the dependencies we have to avoid this workaround.

This would be great! Following on your comment regarding the fact that the duration won't be increased, I understand that is not a high priority, but having a ticket as a follow-up would be helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, interesting. Do we know which dependencies are still using React 17?

I saw a few but can't remember from when I tested, I'll add this in the ticket as well so we have a list.

On the other hand, do we need to run npm run clean:gutenberg:distclean everytime or is this a one-off?

Just when an npm install happens, I know it's not ideal but we can work on this after this gets merged.

This would be great! Following on your comment regarding the fact that the duration won't be increased, I understand that is not a high priority, but having a ticket as a follow-up would be helpful.

I mean it will be increased by a few seconds but it won't impact our development process or CI so much. But still, I'll create a ticket to investigate this a bit further.

@geriux geriux marked this pull request as ready for review December 1, 2022 12:07
@geriux
Copy link
Contributor Author

geriux commented Dec 1, 2022

FYI some CI checks will fail until this PR WordPress/gutenberg#46220 gets merged.

@fluiddot
Copy link
Contributor

fluiddot commented Dec 1, 2022

FYI some CI checks will fail until this PR WordPress/gutenberg#46220 gets merged.

Heads up that WordPress/gutenberg#46220 is already merged in trunk.

Copy link
Contributor

@derekblank derekblank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@fluiddot fluiddot added this to the 1.86.0 (21.4) milestone Dec 2, 2022
@fluiddot
Copy link
Contributor

fluiddot commented Dec 2, 2022

I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@geriux @derekblank please when you're available it would be great to include this change in the release notes. I don't think we should block the merge due to this, especially as we'd need to have trunk with the RN upgrade changes to match Gutenberg's trunk changes. Hence, let's merge this PR and update the release notes in a separate PR 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants