mirror of
https://github.com/therootcompany/golib.git
synced 2026-03-02 23:57:59 +00:00
fix(monorel): restore cross-module binary discovery in recursive walk
The go.mod boundary check added to findMainPackages was stopping the --recursive walk from descending into child module directories, so modules like auth/csvauth/ were never found. The check was redundant: groupByModule already uses findModuleRoot to attribute each binary to its nearest go.mod ancestor, and initModuleGroup already skips modules with uncommitted changes (an untracked go.mod counts as an uncommitted change). Removing the stop restores the pre-regression behaviour.
This commit is contained in:
parent
1c779296e9
commit
455ceb7d69
@ -572,11 +572,6 @@ func findMainPackages(root string, all bool) ([]string, error) {
|
||||
continue
|
||||
}
|
||||
child := filepath.Join(dir, name)
|
||||
// Stop at directories with their own go.mod — they are independent
|
||||
// module roots and should not be included in this module's walk.
|
||||
if _, err := os.Stat(filepath.Join(child, "go.mod")); err == nil {
|
||||
continue
|
||||
}
|
||||
// Skip directories that contain no git-tracked files.
|
||||
if trackedDirs != nil && !trackedDirs[child] {
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user