Skip to content

Conversation

@hinshun
Copy link
Contributor

@hinshun hinshun commented Dec 28, 2025

Since HashMap is unordered, the lockfile produced is non-deterministic because the hashes are serialized in a random order. This is a problem for environments like Nix where we want determinism.

Alternatively, we change pub hashes to BTreeMap but we'll have update all the callsites, this is the minimal fix. Let me know what you prefer.

@hinshun hinshun mentioned this pull request Dec 28, 2025
@deniz-blue
Copy link
Owner

We could update all the callsites, I dont think there are that many
If you want to, go ahead, otherwise tell me and I'll merge

@hinshun hinshun force-pushed the feature/reproducible-lockfile branch from 0f087f2 to 8073e94 Compare December 28, 2025 20:31
@hinshun
Copy link
Contributor Author

hinshun commented Dec 28, 2025

I updated all the callsites, I think it's cleaner too but some folks prefer smaller diffs.

@deniz-blue
Copy link
Owner

I like big changes, how else can we innovate lol

@deniz-blue deniz-blue merged commit 2461e0d into deniz-blue:main Dec 28, 2025
3 checks passed
@hinshun hinshun deleted the feature/reproducible-lockfile branch December 28, 2025 22:33
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