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

[HOLD for payment 2024-09-10] [$1000] Upgrade to RN 0.75 #37374

Closed
roryabraham opened this issue Feb 28, 2024 · 155 comments
Closed

[HOLD for payment 2024-09-10] [$1000] Upgrade to RN 0.75 #37374

roryabraham opened this issue Feb 28, 2024 · 155 comments
Labels
Awaiting Payment Auto-added when associated PR is deployed to production External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Task Weekly KSv2

Comments

@roryabraham
Copy link
Contributor

roryabraham commented Feb 28, 2024

slack context: https://expensify.slack.com/archives/C02NK2DQWUX/p1709024519896479

Problem

There are some new arch problems that should be fixed in RN 0.74+. So far that's the only thing I'm aware of in 0.74+ that we'll need, but it takes a long time to upgrade. It's not necessarily a blocker but unless we upgrade we'll have to use patches.

Solution

Let's get the ball rolling on the RN 0.74 upgrade. If there are issues in the RC we should report them to Meta.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021833172516619025999
  • Upwork Job ID: 1833172516619025999
  • Last Price Increase: 2024-09-09
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @dylanexpensify
@roryabraham roryabraham added Weekly KSv2 Planning Changes still in the thought process Task labels Feb 28, 2024
@roryabraham roryabraham self-assigned this Feb 28, 2024
@MrRefactor
Copy link
Contributor

Hey, I would like to work on this issue!

@roryabraham
Copy link
Contributor Author

roryabraham commented Feb 29, 2024

@MrRefactor I'd strongly recommend you to try https://github.com/infinitered/flame. There's a talk from Jamon it's creator here. I hope it will help streamline the upgrade process for you.

@MrRefactor
Copy link
Contributor

@roryabraham Sure! I will get gpt-4 and try upgrading with that tool!

@roryabraham
Copy link
Contributor Author

wrote some best practices on RN upgrades earlier today:

  1. Look at the release notes to understand what changed.
  2. Look at any patches that we've got, find the upstream PR associated with the patch by looking at the PR that introduced the patch: there should be a link to an upstream PR for the patch in the PR description. Evaluate if that patch is still needed or can be removed. If it's still needed, coordinate with the author of the patch to figure out how it needs to be applied to the new version. Have them update their upstream PR if needed. Also consider alternatives if Meta doesn't seem to be actively reviewing the PR. Open a conversation in slack if you're not sure.
  3. If there are any deprecations, investigate what's needed to remove our usage of deprecated code. It doesn't necessarily need to be a blocker, but we want to try to remove uses of deprecated APIs ASAP.
  4. Use flame, an AI-powered CLI made specifically for upgrading React Native. It uses react-native-upgrade-helper under the hood and leverages GPT-4 to apply the diff more intelligently. Very cool tool, you can see a demo here.
  5. Use 2 C+ testers instead of just 1
  6. Create an AdHoc build and have Applause run a full regression suite
  7. Create a GitHub Project for the upgrade so that if any issues are identified, they can be added to the project and tracked effectively, rather than just being comments in the PR. That way we can track what issues need to be resolved and re-tested on staging.

@mountiny mountiny self-assigned this Mar 1, 2024
@MrRefactor
Copy link
Contributor

Update:

  1. Tried upgrading with flame-ai but as its still in experimental stage its not really working as expected with 0.74, opened an issue with one of the problems connected with that.
  2. Manually applied changes from upgrade-helper - I will create draft PR and will be adding any progress there
  3. I will go through all of the patches and list them to make sure if upgrade of rn version is affecting those

@MrRefactor
Copy link
Contributor

Update:

  1. Working on rc-2 as it was released couple days ago
  2. Working on resolving issues with dependencies, trying to apply temporary workaround to get app running on android & ios
  3. Resolving issues with react-native-quick-sqlite connected to wrong compilation of Folly on iOS
  4. Resolving issues with react-native-live-markdown on android
  5. Checking compatibility in android dependencies connected to gradle versioning
Screenshot 2024-03-08 at 20 43 33 Screenshot 2024-03-08 at 19 58 57

CC: @roryabraham @mountiny

@MrRefactor
Copy link
Contributor

Update:

Created an issue in react-native-quick-sqlite as the same error is visible while building with fresh rn app. In meantime working on a fix for that problem.

@roryabraham
Copy link
Contributor Author

roryabraham commented Mar 11, 2024

Created an https://github.com/margelo/react-native-quick-sqlite/issues/37 in react-native-quick-sqlite as the same error is visible while building with fresh rn app. In meantime working on a fix for that problem.

Posted in the Margelo room

@MrRefactor
Copy link
Contributor

Update:

Created an issue in @expensify/react-native-live-markdown as the same error is visible while building with fresh rn app for android.

@MrRefactor
Copy link
Contributor

Update:

  1. Switching to RC.3 as it was released
  2. Working on patches for @expensify/react-native-live-markdown and react-native-quick-sqlite

@tomekzaw
Copy link
Contributor

@MrRefactor The fix for @expensify/react-native-live-markdown is pretty simple, it's just a matter of changing a single import in MarkdownUtils.java:

-import com.facebook.react.views.text.CustomLineHeightSpan;
+import com.facebook.react.views.text.internal.span.CustomLineHeightSpan;

@MrRefactor
Copy link
Contributor

@tomekzaw Thanks Tomek!

@MrRefactor
Copy link
Contributor

Update:
Implemented workarounds for:

  1. @expensify/react-native-live-markdown
  2. react-native-quick-sqlite

Working on new issues connected with:

Android:

  1. lottie-react-native
  2. expo , expo-modules-core,

iOS

  1. expo-modules-core

I will also create issue & pr in @react-native-async-storage/async-storage as its showing warnings with mismatched versions of ksp version

@MrRefactor
Copy link
Contributor

MrRefactor commented Mar 18, 2024

Also there was a question from @cead22 if we could upgrade rn to 0.73.5 in meantime as its fixing this issue

CC: @mountiny @roryabraham

@roryabraham roryabraham removed the Planning Changes still in the thought process label Mar 19, 2024
@roryabraham
Copy link
Contributor Author

commented in slack, but I think we should press on with the 0.74 upgrade

@roryabraham
Copy link
Contributor Author

roryabraham commented Mar 19, 2024

@MrRefactor, let's start doing updates in slack to get more visibility, then just link to the slack updates here in GH.

How can we help push this along? What are you doing to parallelize the work here? Can we get more people involved to split up the work?

@roryabraham
Copy link
Contributor Author

@MrRefactor looking forward to seeing an update from you on this project.

@MrRefactor
Copy link
Contributor

@shubham1206agra
Copy link
Contributor

@roryabraham, I'm happy to help if a C+ is needed here.

@mountiny mountiny removed Reviewing Has a PR in review Help Wanted Apply this label when an issue is open to proposals by contributors labels Sep 9, 2024
@mountiny mountiny changed the title [HOLD for payment 2024-09-10] [$750] Upgrade to RN 0.75 [HOLD for payment 2024-09-10] [$1000] Upgrade to RN 0.75 Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

Upwork job price has been updated to $1000

@mountiny
Copy link
Contributor

mountiny commented Sep 9, 2024

@dylanexpensify This is ready to be paid out to @shubham1206agra for their help on this one and previously with the 0.74

I think $1000 is fair reward for their testing and code review as well as help with follow ups. Let me know if you disagree

@MuhammadIqbalDev
Copy link

Hi,

The issue likely stems from architectural changes in React Native 0.74+ that are incompatible with your current codebase. The need for patches suggests that your existing setup is not fully aligned with the new architecture, which could introduce bugs, performance regressions, or maintainability challenges. Without upgrading, you may face technical debt, increased complexity, and potential conflicts with future React Native updates.

One possible short-term fix can be applying specific patches with patch-package to replace modules or dependencies that are not compatible, giving alternative solutions for outdated APIs or components. This enables the project to operate without updating while addressing immediate problems. To achieve a lasting fix, transition completely to React Native 0.74+, restructure code to match the new design, verify third-party libraries work well, and conduct thorough testing to prevent any setbacks or additional issues. This will make the project future-proof, get rid of technical debt, and guarantee long-term stability.

Best
Muhammad

Copy link

melvin-bot bot commented Sep 9, 2024

📣 @MuhammadIqbalDev! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@dylanexpensify
Copy link
Contributor

Payment summary:

Contributor+: @shubham1206agra $1000

Please apply/request!

@shubham1206agra
Copy link
Contributor

@dylanexpensify You need to send me an offer through Upwork.

@dylanexpensify
Copy link
Contributor

@dylanexpensify
Copy link
Contributor

invited!

@shubham1206agra
Copy link
Contributor

@dylanexpensify Invitation accepted

@dylanexpensify
Copy link
Contributor

offer sent @shubham1206agra!

@shubham1206agra
Copy link
Contributor

@dylanexpensify Offer accepted

@dylanexpensify
Copy link
Contributor

Paid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Task Weekly KSv2
Projects
Development

No branches or pull requests