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

fix: ensure consistent sorting of locked packages #295

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

baszalmstra
Copy link
Collaborator

This PR replaces some of the HashMaps in the conda-lock data structures with IndexMap (keeps order of insertion) and BTreeMap (sorts by key). This ensures that we get a consistent output in pixi.

I used IndexMap in the places where I thought the order of the source elements was important. For instance, the dependencies specified in the repodata.

I used BTreeMap where I think the order doesn't matter but it should be consistent.

@wolfv
Copy link
Contributor

wolfv commented Aug 27, 2023

Hmm, I am unsure because the IndexMap in the conda-lock part is going to be filled from the repodata right? And do we use (want to use) an IndexMap there? I would argue that sorting the dependencies array alphabetically would be fine (and probably also what is done by conda-build in the repodata).

@tdejager tdejager merged commit fd4029f into conda:main Aug 28, 2023
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.

3 participants