feat: resolve Rust use declarations for cross-module and cross-crate calls

Đang mở
#344 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
35/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, rust

Hướng nghiên cứu

Start from docs/LANGUAGE-CAPABILITY-MATRIX.md line 176 and the Rust indexer code that extracts use declarations as dependency references; trace how module keys are computed at extract time and where the enclosing crate name is missing. Compare the same-file and same-computed-module-path resolution paths to see what a use-imported call needs. Confirm in openspec/specs/ that the deliberate-gap decision still holds, then add cross-module and cross-crate resolution plus tests for callers, callees, and impact.

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

Mô tả

area:indexer enhancement needs-triage
What exists today?

The Rust indexer's handling of use declarations, which feeds call resolution.

How does it behave now?

use declarations are extracted as dependency references but never populate Imports (docs/LANGUAGE-CAPABILITY-MATRIX.md, line 176). A call through a use-imported name does not resolve across modules or crates. Only same-file and same-computed-module-path resolution succeeds.

The matrix gives the cause: the enclosing crate name is not available at extract time, so no matching module key is computed. The matrix also calls this gap deliberate. The maintainer must confirm whether that decision still holds.

The reporter did not attach command output.

How should it behave?

A call to helper, imported with use crate::util::helper;, resolves to the helper definition in module util. A call through use other_crate::helper; resolves to that crate's definition. Trait method resolution through a use import will work the same way.

What kind of improvement?

Correctness in an edge case

Would this change existing behavior?

Yes. Calls through use imports gain call edges in Rust repositories, so the output of codegraph callers, codegraph callees and codegraph impact changes for those repositories.

Before submitting
  • I searched existing issues and this is not a duplicate
  • I verified that the current behavior is not a deliberate decision in openspec/specs/

🤖 Generated with Claude Code
https://claude.ai/code/session_0167Dcyr16pdkFTrCBgBTzoV

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.