Preserve composition conflict claimant order

This commit is contained in:
2026-10-26 18:17:04 +00:00
parent 3ffaef7ede
commit 1954052631
4 changed files with 132 additions and 3 deletions

View File

@@ -88,7 +88,9 @@ func (a *diagnosticAccumulator) loadError() *LoadError {
func canonicalDiagnostics(diagnostics []Diagnostic) []Diagnostic {
canonical := cloneDiagnostics(diagnostics)
for i := range canonical {
slices.SortFunc(canonical[i].Related, compareLocation)
if canonical[i].Code != CodeComposeConflict {
slices.SortFunc(canonical[i].Related, compareLocation)
}
}
type orderedDiagnostic struct {
diagnostic Diagnostic