feat: resolve references by path across languages
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 0
- Forks
- 0
- Avg merge
- 5h 16m
- Merged PRs (30d)
- 107
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from seanb4t/codegraph-go
-
area:indexer bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#385 ·
Maintainers usually reply within 1 day
-
chore needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
seanb4t/codegraph-go#380 ·
Maintainers usually reply within 1 day
-
chore needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#379 ·
Maintainers usually reply within 1 day
-
chore needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
seanb4t/codegraph-go#362 ·
Maintainers usually reply within 1 day
-
area:query bug priority:low spec-needed
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
seanb4t/codegraph-go#355 ·
Maintainers usually reply within 1 day
All issues in seanb4t/codegraph-go
Similar issues
-
enhancement exporter/awskinesis needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-collector-contrib#53334 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
erigontech/erigon#26523 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
SocialGouv/iterion#3376 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
seaweedfs/seaweedfs#12740 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day