Move the Go build source reader out of internal/builder so the builder can go (issue 1851, C1a)
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/novox/mesh-controller/internal/gosource"
|
||||
"regexp"
|
||||
"slices"
|
||||
"sort"
|
||||
@@ -13,7 +14,6 @@ import (
|
||||
"time"
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
||||
"github.com/novox/mesh-controller/internal/builder"
|
||||
"github.com/novox/mesh-controller/internal/inventory"
|
||||
"github.com/novox/mesh-controller/internal/link"
|
||||
)
|
||||
@@ -483,7 +483,7 @@ func whyMoved(e inventory.Entry, read []inventory.ReadRepository, m link.SourceM
|
||||
held := func(paths []string) []string {
|
||||
var in []string
|
||||
for _, p := range m.Paths {
|
||||
if builder.SourceHolds(paths, p) {
|
||||
if gosource.SourceHolds(paths, p) {
|
||||
in = append(in, p)
|
||||
}
|
||||
}
|
||||
@@ -670,7 +670,7 @@ func readsFrom(read []inventory.ReadRepository, m link.SourceMoved) bool {
|
||||
return true
|
||||
}
|
||||
for _, p := range m.Paths {
|
||||
if builder.SourceHolds(r.Paths, p) {
|
||||
if gosource.SourceHolds(r.Paths, p) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -695,7 +695,7 @@ func ownSource(read []inventory.ReadRepository) []string {
|
||||
// for a module built from the repository's root.
|
||||
func readsFile(e inventory.Entry, read []inventory.ReadRepository, p string) bool {
|
||||
if own := ownSource(read); own != nil {
|
||||
return builder.SourceHolds(own, p)
|
||||
return gosource.SourceHolds(own, p)
|
||||
}
|
||||
return readsDirectory(e, p)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user