-
Notifications
You must be signed in to change notification settings - Fork 4
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
Map.String is not clonable #8
Comments
I investigated this more. The situation is that Belt.Map has a cmp field in the generated object, which holds a function. That function (like all functions) can't be serialized using the cloning algorithm used by web workers. I tried to fix this in darklang/tablecloth#229. This PR separated Set.String.t from Set.t, making the former a Belt.Set.String, which has a built-in comparator and does not suffer from the cmp field issue. Ultimately, this became very annoying very fast. It had a number of issues:
|
This will be solved by #6, leaving open to confirm. |
When attempting to send a Map.String.t to a web worker, I got an error:
This was not the case in 0.0.7. I think the difference is that StrDict in 0.0.7 was a Belt.MapString, which had a built-in comparator.
The text was updated successfully, but these errors were encountered: