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

Make output order consistent #32

Closed
Fuuzetsu opened this issue Sep 1, 2017 · 2 comments
Closed

Make output order consistent #32

Fuuzetsu opened this issue Sep 1, 2017 · 2 comments
Assignees

Comments

@Fuuzetsu
Copy link
Contributor

Fuuzetsu commented Sep 1, 2017

I just adjusted a couple of dependencies in a project and it resulted in 2KLOC change in packages.nix (pruned). I suspect change in transitive dependencies caused some packages to be resolved sooner/later and therefore be placed in different place. If packages are sorted by name, diffs should be much smaller.

I don't have a public test-case, sorry.

@Fuuzetsu Fuuzetsu changed the title Make output order Make output order consistent Sep 1, 2017
@4e6
Copy link
Contributor

4e6 commented Sep 13, 2017

We are using Data.Map, Data.Set, and Data.Graph to store and manipulate loaded packages. They all require Ord class on construction, thus should have a stable order. I also can not think of a place where reordering can happen.

The most obvious thing would be to sort resulting packages set as a final step.

@4e6 4e6 self-assigned this Sep 13, 2017
@4e6
Copy link
Contributor

4e6 commented Sep 13, 2017

The order of extra deps in stack.yaml should matter. It may affect the reachableDependencies DFS algorithm. It is most likely the source of a problem.

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

No branches or pull requests

2 participants