From e5b7b4f7d7b23766b8a3d52f9817f51c5844919b Mon Sep 17 00:00:00 2001 From: Snider Date: Thu, 26 Mar 2026 07:43:02 +0000 Subject: [PATCH] fix: only clone direct deps, skip indirect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit parseCoreDeps now skips // indirect lines from go.mod. Reduces cloned repos from 17 to 10 — only what the repo directly imports. Co-Authored-By: Virgil --- pkg/agentic/deps.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/agentic/deps.go b/pkg/agentic/deps.go index 1063cf9..695b34e 100644 --- a/pkg/agentic/deps.go +++ b/pkg/agentic/deps.go @@ -77,8 +77,8 @@ type coreDep struct { dir string // e.g. "core-go" (workspace subdir) } -// parseCoreDeps extracts Core ecosystem dependencies from go.mod content. -// Finds all require lines matching dappco.re/go/* or forge.lthn.ai/core/*. +// parseCoreDeps extracts direct Core ecosystem dependencies from go.mod content. +// Skips indirect deps — only clones what the repo directly imports. func parseCoreDeps(gomod string) []coreDep { var deps []coreDep seen := make(map[string]bool) @@ -86,6 +86,11 @@ func parseCoreDeps(gomod string) []coreDep { for _, line := range core.Split(gomod, "\n") { line = core.Trim(line) + // Skip indirect dependencies + if core.Contains(line, "// indirect") { + continue + } + // Match dappco.re/go/* requires if core.HasPrefix(line, "dappco.re/go/") { parts := core.Split(line, " ")