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

オープン
#344 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Go
スター
0
フォーク
0
平均マージ
7時間 42分
マージ済み PR(30日)
111

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

seanb4t/codegraph-go のほかの issue

seanb4t/codegraph-go の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。