feat: resolve Rust use declarations for cross-module and cross-crate calls
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
- Lĩnh vực
- developer-experience, tooling
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ả
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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của seanb4t/codegraph-go
-
chore needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
seanb4t/codegraph-go#380 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
seanb4t/codegraph-go#379 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query chore needs-triage spec-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
seanb4t/codegraph-go#377 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
seanb4t/codegraph-go#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
seanb4t/codegraph-go#355 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của seanb4t/codegraph-go
Issue tương tự
-
go-vulnerability security-scan
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
teslashibe/agent-go#35 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alecthomas/chroma#1498 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 8 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày