Skip to content

Make merging trees structurally non-empty - #889

Open
mheinzel wants to merge 5 commits into
mainfrom
mheinzel/structurally-non-empty
Open

mheinzel wants to merge 5 commits into
mainfrom
mheinzel/structurally-non-empty

Conversation

@mheinzel

@mheinzel mheinzel commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

This matches the prototype and avoids introducing and handling the special case of structurally empty trees.

In fact, we never had union levels with a structurally empty merging tree in the first place. Structurally empty trees only existed as intermediate values in unionsInOpenSession, where we now using Nothing instead. Therefore, the snapshot format does not need to change. Old snapshots can be parsed without issues, as they don't contain structurally empty trees.

The SnapPendingMerge type could enforce these invariants statically by using NonEmpty. However this would caused some more code churn, so I abandoned it for now. Let me know if you think it's worth pursuing.

Before merging, I'd like to do some squashing and add documentation to code and commit messages.

@mheinzel mheinzel self-assigned this Oct 2, 2026

This branch has not been deployed

No deployments
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.

1 participant