Skip to content

Fix fastMerge worklet#869

Merged
mollfpr merged 1 commit into
Expensify:mainfrom
software-mansion-labs:@Skalakid/fix-fastMerge-worklet
Jul 10, 2025
Merged

Fix fastMerge worklet#869
mollfpr merged 1 commit into
Expensify:mainfrom
software-mansion-labs:@Skalakid/fix-fastMerge-worklet

Conversation

@Skalakid

@Skalakid Skalakid commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

We've tried updating expensify-common to the latest version (2.0.144) in the react-native-live-markdown repo, but encountered crashes due to invalid fastMerge file workletization caused by #855. Because in this file we can find double-function recursion and worklets aren't hoisted, it results in a crash with an error: Cannot access 'fastMerge' before initialization.

In this PR, I'm breaking double function recursion and moving the mergeObject code inside the fastMerge function. It shouldn't affect anything since mergeObject isn't exported, only fastMerge was using it.

Fixed Issues

$ Expensify/App#39518

Tests

  1. Verify if E/App isn't crashing in LHN with this change
  2. Verify if the live-markdown example app isn't crashing too with this change

QA

Same as Tests

@Skalakid Skalakid requested a review from a team as a code owner July 9, 2025 12:20
@melvin-bot melvin-bot Bot requested review from mollfpr and removed request for a team July 9, 2025 12:20
@adderly

adderly commented Jul 10, 2025

Copy link
Copy Markdown

This is needed for using the latest versions of markdown library.

@mollfpr mollfpr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@mollfpr mollfpr merged commit 882c612 into Expensify:main Jul 10, 2025
6 checks passed
@os-botify

os-botify Bot commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

🚀 Published to npm in 2.0.148 🎉

@adderly

adderly commented Jul 10, 2025

Copy link
Copy Markdown

Thank you

@eVoloshchak

Copy link
Copy Markdown
Contributor

Hi @Skalakid 👋
This seems to have caused a TS error
image

@dmkt9 dmkt9 mentioned this pull request Aug 7, 2025
51 tasks
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.

4 participants