Enhancement: link Go modules in the same repository through `go.work` and local `replace` paths

Aperta
#666 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@vibgrate-team ci sta già lavorando.

Dal 12/11/2026.

  • #671 di @vibgrate-team — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
go, typescript
Ambito
data, devtools

Direzione di ricerca

Read src/core-open/scanners/go-scanner.ts and the existing Maven and npm workspace reference handling. Start by tracing how local replace paths are parsed and matched to scanned Go projects; the issue names no test file, so locate the Go scanner fixtures and tests. Done means local replacements create sorted, deduplicated project references, remote replacements do not, and the stated cases are covered; linked pull request #671 is already open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Context

The Go scanner in src/core-open/scanners/go-scanner.ts returns one project per go.mod but never sets projectReferences. Maven modules (<modules>) and npm workspaces already get those edges, so the architecture and graph views can show how projects in a monorepo depend on each other. Go monorepos currently look like a set of unrelated modules.

Go has two clear signals for local module links:

  • a go.work file at the root with use ./svc/api / use ( ... ) entries
  • a replace example.com/lib => ../lib directive whose target is a local path (the scanner already detects these and skips the proxy lookup for them)

What to do

  1. For each local-path replace, add a projectReferences entry pointing at the replaced module's directory (relative to the scan root), when that directory is one of the scanned Go projects.
  2. Optionally read a root go.work and, for each use module that a project requires by module path, add the same kind of reference.
  3. Use refType: 'project' (or the closest existing type) and keep the list sorted and de-duplicated.
  4. Add a fixture with two modules linked by a local replace and a go.work.

Acceptance

  • A module with replace example.com/lib => ../lib has a project reference to ../lib
  • Remote replaces do not create references
  • Modules without local links have no projectReferences
  • Tests cover the replace case (and go.work if implemented)
Lingua principale
TypeScript
Stelle
4
Fork
3
Merge medio
1g 22h
PR unite (30g)
76

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vibgrate/cli

Tutte le issue di vibgrate/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.