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

Use lodash temporarily for deep cloning #489

Merged
merged 2 commits into from
Mar 20, 2025
Merged

Conversation

JonoPrest
Copy link
Collaborator

@JonoPrest JonoPrest commented Mar 20, 2025

This fixes a bug where BigDecimal objects had their prototypes stripped during nodejs "structuredClone".

It had the isEqualTo method stripped away which caused a runtime failure on the inMemoryTable indexes during a test.

@DZakh I've added lodash as a dep to use their cloneDeep method but I think we could use rescript schema to generated deep clone functions.

@JonoPrest JonoPrest requested review from DZakh and DenhamPreen March 20, 2025 15:11
@JonoPrest JonoPrest force-pushed the jp/hotfix-structured-clone branch from 11861f4 to fbb9a74 Compare March 20, 2025 16:20
@JonoPrest
Copy link
Collaborator Author

Note I've removed it as a dep and vendored just the function we need. (Still over a thousand lines of js we could maybe ✂️ )

@JonoPrest JonoPrest merged commit 2657811 into main Mar 20, 2025
1 check passed
@JonoPrest JonoPrest deleted the jp/hotfix-structured-clone branch March 20, 2025 16:31
@JonoPrest JonoPrest changed the title Usel lodash temporarily for deep cloning Use lodash temporarily for deep cloning Mar 20, 2025
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.

2 participants