Closed LSViana closed 1 year ago
Hi, @Horusiath!
I finished the Doc bindings and figured out the issues I was having when running multiple unit tests and also with struct parsing on Windows. Then, I started working on the Transaction bindings (this issue).
It went smoothly until the last methods I had to bind: EncodeStateFromSnapshot*
(both V1 and V2). The issue I'm having is probably due to misuse of the function, then I'd like to confirm it with you.
No need to run the code/test locally, but can you check if this test makes sense? I'm asking this because when I'm running it, I'm expecting the new document to have the same state as the origin but it's actually missing a letter:
This happens on both macOS and Windows.
I didn't find any resources explaining this but if they exist, please just share the directions and I'll check them.
Hey, @Horusiath!
An update on the question I mentioned in the comment above: it happens on the Rust side too.
It's a unit test that can be pasted at the bottom of yffi/src/lib.rs
.
The results are the same I got on the C# side:
So, in short, I'm probably misusing the library here and I'll need some extra instruction to understand this feature correctly.
Thanks, I'll take a look at it.
Implement the bindings for the Transaction struct based on the exposed bindings.
ytransaction_subdocs
ytransaction_commit
ytransaction_writeable
ytransaction_state_vector_v1
ytransaction_state_diff_v1
ytransaction_state_diff_v2
ytransaction_apply
ytransaction_apply_v2
ytransaction_snapshot
ytransaction_encode_state_from_snapshot_v1
ytransaction_encode_state_from_snapshot_v2
For each bound method, the implementation and unit tests must be written.