Skip to content

Stub nodes break cross-language inheritance edges #439

Open

Description

@V0v1kkk

Problem

When C# code inherits from a type defined in another language (e.g. F#), the C# extractor creates a stub node with no source_file because it can't resolve the base type. The inherits edge points to this stub instead of the real definition node.

For example, class SqliteBookStore : BookStore creates a stub bookstore node, while the actual F# abstract class is interfaces_bookstore (from Interfaces.fs). The inheritance edge connects to the wrong node, breaking cross-language graph connectivity.

Proposed Fix

Add a post-extraction pass that:

  1. Identifies stub nodes (no source_file) that have a matching real definition (by label match)
  2. Prioritizes definition files (Interfaces.fs, Domain.fs, Types.fs, Contracts.fs, Abstractions.fs)
  3. Redirects all edges from the stub to the real definition node
  4. Removes the stub

Impact

Tested on a mixed F#/C# project — all inherits edges now point to real definitions instead of stubs. Cross-language graph connectivity significantly improved.

I have a PR ready.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions