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

test that illustrates failure scenario for issue #54 #55

Merged
merged 7 commits into from
Jul 29, 2023
Merged

Conversation

heckj
Copy link
Collaborator

@heckj heckj commented Jul 29, 2023

Resolves #54

Captures the encoding tree as the encoder works between local code and synthesized or provided Codable implementations for types, capturing the details of what containers were written - max index positions and keys written/updated. Post-encode walks that tree and removes any extra values - which allows for keys to be removed from maps, and arrays to shrink to encoded positions.

@heckj heckj self-assigned this Jul 29, 2023
@heckj heckj marked this pull request as ready for review July 29, 2023 23:32
@heckj heckj merged commit 1303f4d into main Jul 29, 2023
@heckj heckj deleted the arraybug branch July 29, 2023 23:57
heckj added a commit that referenced this pull request Jul 30, 2023
* test that illustrates failure scenario for issue #54
* establishing a tree of AutomergeEncoderImpl during encoding to be able to later walk and clean up where needed
* tracking keys written, highest index written, and objectIds for each container when found
* removing extraneous elements from tree, test to verify tree integrity
* verifying ObjectId found for each relevant container
* enables post-encoding cleanup using details from captured encode-tree
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.

shrinking a codable array isn't working
1 participant