Finish native migration cleanup and restore whole-tree compilation

This commit is contained in:
2026-11-22 05:37:15 +00:00
parent 4fa437aee8
commit 3ef55f4668
12 changed files with 123 additions and 445 deletions

View File

@@ -2,9 +2,7 @@ package cli
import (
"context"
"errors"
"fmt"
"io"
"os"
"reflect"
"strings"
@@ -162,25 +160,3 @@ func captureOverrideValue(value any) any {
return value
}
}
func writeConfigLoadError(output io.Writer, err error) {
var loadError *configkit.LoadError
if errors.As(err, &loadError) {
if writeErr := configkit.WriteDiagnostics(output, loadError.Diagnostics()); writeErr == nil {
// ConfigKit's locations contain source IDs. Keep its renderer and
// supply the acquired-source legend so imported/overlay errors can
// be traced to a file. Quoting also escapes terminal controls.
for _, source := range loadError.Sources() {
label := source.Path
if label == "" {
label = source.Label
}
if _, err := fmt.Fprintf(output, "source %q: %q\n", source.ID, label); err != nil {
return
}
}
return
}
}
fmt.Fprintf(output, "notarius: %v\n", err)
}