Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: C#: calls through a cast, an interface-typed property, `?.`, or a partial class's other file are dropped without being listed as unresolved

Chiusa
#3,797 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, python
Ambito
devtools

Direzione di ricerca

Start with the four-file C# reproduction in Store.cs, Window.cs, Editor.cs, and EditorTarget.cs, focusing on the Run entry point and the dropped calls. Trace the C# call-resolution path for cast, interface-typed property, conditional-access, and partial-class receivers. Done means the expected calls edges are emitted, or each unresolved call appears in unresolved_calls.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
What happened?

When the caller and callee live in different files, several common receiver shapes produce no
calls edge at all, and the call is also missing from the caller's unresolved_calls metadata,
so the gap is invisible. The same shapes do resolve when everything is in one file.

Steps to reproduce
Repro — four files:

`Store.cs`

namespace Demo
{
    public interface IStore { void Save(); }

    public class Store : IStore
    {
        public void Save() { }
    }
}


`Window.cs`

namespace Demo
{
    public class Window
    {
        public void Refresh() { }
        public void SetTarget(object o) { }
    }
}


`Editor.cs`

namespace Demo
{
    public partial class Editor
    {
        object _obj;
        Window _window;
        IStore Store => (IStore)_obj;

        public void Run()
        {
            ((IStore)_obj).Save();   // cast receiver
            Store.Save();            // interface-typed property receiver
            _window?.Refresh();      // conditional access on a typed field
            SetTarget(_obj);         // implicit this; defined in the other partial file
        }
    }
}


`EditorTarget.cs`

namespace Demo
{
    public partial class Editor
    {
        void SetTarget(object o) { }
    }
}
Error output or graph output
Actual: `editor_demo_editor_run` has **no** outgoing `calls` edges and no `unresolved_calls`
entries. (The `IStore.Save --dispatches_to--> Store.Save` edge from #3003 is present, but nothing
reaches `IStore.Save`, so a walk from `Run` never gets there.)

Expected: `Run --calls--> IStore.Save()` (twice collapsing to one), `Run --calls-->
Window.Refresh()`, `Run --calls--> Editor.SetTarget()`; or, at minimum, each dropped call listed
in `unresolved_calls` like other unresolved calls are.

Why it matters: in a codebase whose editor assembly reaches the runtime only through interfaces
(`((IFoo)x).M()` and `Ed.M()` through an `IFoo Ed => (IFoo)_x;` property are the idiom), the main
cross-assembly interface had zero incoming calls. A local post-pass that types these receivers
recovered about 600 call edges on ~120 files, and about 4,000 of the call sites it resolved
matched edges graphify already had.
Graphify version

No response

Environment

graphify 0.9.67 (pip graphifyy), Python 3.13.1, Windows 10 (10.0.19045)

Additional context

No response

Lingua principale
Python
Stelle
124k
Fork
11.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Graphify-Labs/graphify

Tutte le issue di Graphify-Labs/graphify

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.