Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Add a secondarySort parameter to topologicalSort #70

Merged
merged 3 commits into from
Feb 9, 2022
Merged

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Feb 5, 2022

This makes it possible to enforce a topological sort but ensure that
within that, existing nodes are sorted lexically as much as possible.

@nex3 nex3 requested a review from natebosch February 5, 2022 00:08
This makes it possible to enforce a topological sort but ensure that
within that, existing nodes are sorted lexically as much as possible.
@natebosch
Copy link
Contributor

I might not have time for a closer review until Monday.

What is the use case?

@nex3
Copy link
Contributor Author

nex3 commented Feb 5, 2022

My specific use-case is wanting to sort a list of BUILD targets topologically, but also cluster them by directory as much as possible to avoid redundant buildozer commands.

lib/src/topological_sort.dart Show resolved Hide resolved
lib/src/topological_sort.dart Outdated Show resolved Hide resolved
lib/src/topological_sort.dart Outdated Show resolved Hide resolved
@nex3 nex3 requested a review from natebosch February 9, 2022 00:15
@natebosch natebosch merged commit f555487 into master Feb 9, 2022
@natebosch natebosch deleted the secondary-sort branch February 9, 2022 00:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants