sortedSCCMembers returns a copy of scc sorted by sortKey for deterministic install order.
(scc []*objectEntry)
| 486 | // sortedSCCMembers returns a copy of scc sorted by sortKey for deterministic |
| 487 | // install order. |
| 488 | func sortedSCCMembers(scc []*objectEntry) []*objectEntry { |
| 489 | out := make([]*objectEntry, len(scc)) |
| 490 | copy(out, scc) |
| 491 | slices.SortStableFunc(out, func(a, b *objectEntry) int { |
| 492 | return cmp.Compare(a.sortKey(), b.sortKey()) |
| 493 | }) |
| 494 | return out |
| 495 | } |
| 496 | |
| 497 | // sortSCCsByMin sorts a slice of SCC indices in place by the lex-smallest |
| 498 | // sortKey among each SCC's members. Stable ordering. |
no test coverage detected