feat: resolve references by path across languages
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with the UnresolvedRef struct in internal/indexer/goextract/types.go near line 118, then compare it with the emitters in kotlinextract.go:146 and rubyextract.go:148 to see the shared shape. The open question is whether path resolution uses one Addressing kind or one per target, and that design choice comes before any code. Done means path-named references get edges in callers, callees and impact output while unmatched paths stay unresolved and no existing field changes.
由索引模型根据 Issue 内容生成。
描述
What exists today?
The Go extractor emits unresolved references as UnresolvedRef in internal/indexer/goextract/types.go:118. The struct has Name, PkgAlias and Kind, and no field for a path.
How does it behave now?
Every language extractor emits the same UnresolvedRef with Name and PkgAlias only. Examples: internal/indexer/mainstream/kotlinextract/kotlinextract.go:146 and internal/indexer/mainstream/rubyextract/rubyextract.go:148.
A string that names a file, a route, a template or a config key has no path field. The index has no way to link it to the file that defines it.
The Addressing field named in the follow-up to #198 is not in the tree at 834d3247. rg -n Addressing returns no match.
How should it behave?
An unresolved reference that names a path resolves to the file that defines it. For example, a Go call that loads templates/user.html links to that template file.
A path that matches no file stays unresolved, as it does today.
Whether one Addressing value covers route handlers, templates and config keys, or each one gets its own kind, is open.
What kind of improvement?
Other: cross-language edges that the index misses today.
Would this change existing behavior?
Yes. Path-named references gain new edges in callers, callees and impact output. Agents consume these shapes. The new edges must be additive. No field can be renamed or removed.
Before submitting
- I searched existing issues and this is not a duplicate
- I checked that the current behavior is not a deliberate decision in
openspec/specs/
Related: #198. Its index-invariants change proposal is on branch feat/198-index-invariants.
- 主要语言
- Go
- 星标
- 0
- 派生
- 0
- 平均合并
- 7 小时 42 分钟
- 30 天内合并 PR
- 111
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
seanb4t/codegraph-go 的其他 Issue
-
chore needs-triage
难度 1/5 1 小时以内 新手友好度 88/100
seanb4t/codegraph-go#380 ·
维护者通常 1 天内回复
-
chore needs-triage
难度 2/5 1-3 小时 新手友好度 82/100
seanb4t/codegraph-go#379 ·
维护者通常 1 天内回复
-
area:query chore needs-triage spec-needed
难度 2/5 1-3 小时 新手友好度 74/100
seanb4t/codegraph-go#377 ·
维护者通常 1 天内回复
-
chore needs-triage
难度 1/5 1-3 小时 新手友好度 84/100
seanb4t/codegraph-go#362 ·
维护者通常 1 天内回复
-
area:query bug needs-triage
难度 2/5 1-3 小时 新手友好度 80/100
seanb4t/codegraph-go#355 ·
维护者通常 1 天内回复
查看 seanb4t/codegraph-go 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
automated documentation maintenance
难度 1/5 1-3 小时 新手友好度 75/100
github/gh-aw-mcpg#16717 ·
维护者通常 1 天内回复
-
Docs: Recording rules pages don't say what happens to a recorded metric when its rule is deleted未关闭internal
难度 1/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 74/100
jesseduffield/lazygit#6229 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
prometheus/prometheus#20482 ·
维护者通常 2 天内回复