feat: resolve references by path across languages

Đang mở
#249 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, kotlin, ruby
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:indexer enhancement priority:low
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.

Ngôn ngữ chính
Go
Star
0
Fork
0
Merge trung bình
7 giờ 42 phút
Pull request đã merge (30 ngày)
111

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của seanb4t/codegraph-go

Tất cả issue của seanb4t/codegraph-go

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.