C#: calls through ?., extension methods, method groups and calls on a method result are not linked
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the C# call and reference indexing paths, then trace how they resolve receiver types and method groups. Use the supplied Consumer.cs examples to reproduce each missing edge and check callers or impact on the indexed methods; done means the expected calls and references appear for all five cases.
索引モデルが issue の本文から書いたものです。
説明
Version: 1.6.2 (latest release). The Unreleased changelog on main at 69af19a (2026-10-24) has C# entries for initializers and for calls on new X(), none for these cases. I could not run main.
Repro
Consumer.cs
using System;
using System.Threading.Tasks;
public class Mailer
{
public void Send(string to) { }
}
public static class TextExtensions
{
public static string Shout(this string text) => text.ToUpper();
}
public class Worker
{
public void Run() { }
}
public class Consumer
{
private readonly Mailer _mailer = new Mailer();
private Mailer? _maybe;
public void Plain() { _mailer.Send("a"); }
public void NullConditional() { _maybe?.Send("b"); }
public void Chained() { GetMailer().Send("c"); }
public string Extension() => "hi".Shout();
public Task MethodGroupArgument()
{
var worker = new Worker();
return Task.Run(worker.Run);
}
public Action MethodGroupAssignment()
{
var worker = new Worker();
Action later = worker.Run;
return later;
}
private Mailer GetMailer() => _mailer;
}
$ codegraph callers Mailer.Send --json → caller Plain only (edge at line 24)
$ codegraph callers TextExtensions.Shout --json → no callers
$ codegraph callers Worker.Run --json → no callers
The index has no calls edge for lines 26, 28, 30, 35 and 41.
Expected
| Line | Code | Expected link |
|---|---|---|
| 26 | _maybe?.Send("b") |
NullConditional → Mailer.Send (field typed Mailer?) |
| 28 | GetMailer().Send("c") |
Chained → Mailer.Send (declared return type of GetMailer) |
| 30 | "hi".Shout() |
Extension → TextExtensions.Shout (first parameter this string) |
| 35 | Task.Run(worker.Run) |
MethodGroupArgument references Worker.Run |
| 41 | Action later = worker.Run; |
MethodGroupAssignment references Worker.Run |
For the two method groups, a references edge would be enough: they are not calls at that point, but today callers and impact on Worker.Run say that nothing uses it.
- 主要言語
- C
- スター
- 73.2k
- フォーク
- 4.7k
- 平均マージ
- 3時間 15分
- マージ済み PR(30日)
- 576
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
colbymchenry/codegraph のほかの issue
-
mcp: a projectPath naming a file inside a project returns isError ("Path is not a directory")対応中かも @maxmilian が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
colbymchenry/codegraph#2982 ·
メンテナーはふだん 1 日以内に返信
-
mcp: a non-object tools/call arguments crashes the handler and is reported as an internal error to retry対応中かも @kjgggggg が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
colbymchenry/codegraph#2981 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
colbymchenry/codegraph#2974 ·
メンテナーはふだん 1 日以内に返信
-
search: FTS special characters are deleted, not separated, so leaf(entry) matches nothing対応中かも @kjgggggg が 1 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
colbymchenry/codegraph#2971 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
colbymchenry/codegraph#2959 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
colbymchenry/codegraph の issue をすべて見る
似ている issue
-
Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/nuttx-apps#3942 ·
メンテナーはふだん 1 日以内に返信
-
Add missing unit tests for IsAdmissionPolicyName and IsCertManagerResourceName対応中かも @a1h8 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
kubernetes-sigs/security-profiles-operator#3644 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
ly05010419/MacNativeGames#1340 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信