Skip to content

[Bug]: affected on an overriding method misses every caller that reaches it through the base or interface method #4330

Closed

Description

@rohit-jsfreaky

Pre-flight checks

  • I have checked the Troubleshooting section in the README

What happened?

A call site names the declared type, so its calls edge points at the base or interface member: walker.walk(v) with v: NodeVisitor links to NodeVisitor.head. At runtime it runs whichever override the object has. Nothing links an override to the member it overrides, so graphify affected on the override walks only the callers that name the subclass, and every caller through the base type is missing.

interface NodeVisitor { void head(String n); }
class Printer implements NodeVisitor { public void head(String n) {} }
class Walker { void walk(NodeVisitor v) { v.head("x"); } }
$ graphify affected printer_printer_head
Affected nodes for .head()
...
No affected nodes found.

Walker.walk runs Printer.head. (The node id is used because Printer.head as a name is #4134's subject.)

Expected: Changing Printer.head affects Walker.walk: the callers of the member an override overrides are callers of the override too.

Steps to reproduce

Save the three classes as `NodeVisitor.java`, `Printer.java`, `Walker.java`, run `graphify update .`, then `graphify affected printer_printer_head`. With this fix: `- .walk() [calls] Walker.java:L1`.

Error output or graph output

No error. `affected` prints `No affected nodes found.` for the overriding method.

Graphify version

0.9.85 (b4e6307)

Operating System

Windows

Python Version

3.12

Installation Method

built from source (git clone)

Additional Environment Details

Windows 11, Python 3.12, graphify 0.9.85 from source (v8 b4e6307).

Additional context

For every method that overrides a supertype member, javac's callers that reach it only through that member (Java, src/main/java), and how many affected(method, depth 1) lists, 0.9.85:

project callers through the overridden member (files) listed
jackson-core 1125 6 (1%)
commons-io 637 0 (0%)
jsoup 452 3 (1%)
commons-lang 341 1 (0%)

TypeScript, counted on graphify's own calls edges into the overridden member: TypeORM 1737 of 1737 missed, NestJS 98 of 98.

PR right after this issue.

Activity

  1. added
    bug
    on Oct 11, 2026
  2. github-actions commented on Oct 11, 2026

    @github-actions

    Thanks for opening this issue, @rohit-jsfreaky. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

  3. safishamsi commented on Oct 11, 2026

    @safishamsi
    Member

    Fixed in 0.9.86 (now on PyPI) via #4331. Thanks @rohit-jsfreaky!

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions