Skip to content

make declaration order stable when generating bindings#212

Merged
dicej merged 2 commits intobytecodealliance:mainfrom
dicej:stable-bindings
Apr 8, 2026
Merged

make declaration order stable when generating bindings#212
dicej merged 2 commits intobytecodealliance:mainfrom
dicej:stable-bindings

Conversation

@dicej
Copy link
Copy Markdown
Collaborator

@dicej dicej commented Apr 8, 2026

Previously, the binding generator was non-deterministic in that it would generate different output for the same input across several runs due to the use of randomly-seeded HashMaps and HashSets. Now we ensure the iteration order over those maps and sets is deterministic by first converting them to BTreeMaps and BTreeSets, respectively.

Also, the Raises clause we were adding to docstrings had not been updated to point to componentize_py_types.Err, so I fixed that as well.

dicej added 2 commits April 8, 2026 16:25
Previously, the binding generator was non-deterministic in that it would
generate different output for the same input across several runs due to the use
of randomly-seeded `HashMap`s and `HashSet`s.  Now we ensure the iteration order
over those maps and sets is deterministic by first converting them to
`BTreeMap`s and `BTreeSet`s, respectively.

Also, the `Raises` clause we were adding to docstrings had not been updated to
point to `componentize_py_types.Err`, so I fixed that as well.
@dicej dicej merged commit 81d582a into bytecodealliance:main Apr 8, 2026
4 checks passed
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