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

オープン
#666 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@vibgrate-team がすでに取り組んでいます。

2026年11月12日 から。

  • #671 @vibgrate-team による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
go, typescript
領域
data, devtools

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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)
主要言語
TypeScript
スター
4
フォーク
3
平均マージ
1日 22時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

vibgrate/cli のほかの issue

vibgrate/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。