Skip to content

fix: replace hashmap for btreemap for determinism#39

Merged
BenjaminRi merged 1 commit intoBenjaminRi:masterfrom
edouardparis:replace-hashmap-btreemap
Oct 12, 2025
Merged

fix: replace hashmap for btreemap for determinism#39
BenjaminRi merged 1 commit intoBenjaminRi:masterfrom
edouardparis:replace-hashmap-btreemap

Conversation

@edouardparis
Copy link
Contributor

After using winresource crate, my team and I encountered reproducible build failure. We manage to have it work with this patch inspired by mxre/winres#50

Iteration over Hashmap is not always in the same order, while with BTreeMap it is.

@BenjaminRi
Copy link
Owner

BenjaminRi commented Oct 11, 2025

Hi, thank you for your contribution. This looks good to me, I'll merge it.

Please note that this library does not make any guarantees with respect to reproducible builds. In particular, it calls rc.exe or the rc provided by your toolchain, which is not under our control and may not behave deterministically. However, if this change is enough for you to get determinism, that's good.

@BenjaminRi BenjaminRi merged commit 9434ae4 into BenjaminRi:master Oct 12, 2025
4 checks passed
@edouardparis edouardparis deleted the replace-hashmap-btreemap branch October 13, 2025 07:45
@BenjaminRi
Copy link
Owner

Your change has been released in version 0.1.24.

@edouardparis
Copy link
Contributor Author

Thank you for the information !

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.

2 participants