Skip to content

fix: include class instantiations in callers - #355

Closed
bohe76 wants to merge 1 commit into
colbymchenry:mainfrom
bohe76:fix-class-instantiation-callers
Closed

bohe76 wants to merge 1 commit into
colbymchenry:mainfrom
bohe76:fix-class-instantiation-callers

Conversation

@bohe76

@bohe76 bohe76 commented May 23, 2026

Copy link
Copy Markdown

Summary

  • Include instantiates edges in caller traversal so class usages through construction/static class access are surfaced by getCallers, CLI callers, and MCP callers.
  • Add a regression test that verifies a class instantiation is returned as a caller.

Validation

pm run build

px vitest run tests/graph.test.ts --minWorkers=1 --maxWorkers=1 --testTimeout=30000 --hookTimeout=30000 --no-file-parallelism

ode dist\bin\codegraph.js callers CodeGraph --path . --json now includes ryInitializeDefault and
etryInitIfNeeded class usage results.

@colbymchenry

Copy link
Copy Markdown
Owner

Thanks for this, @bohe76! The same change landed in #804 (issue #774) and shipped in 1.0.0: callers <Class> now includes the places that construct it. On your fixture, main [instantiates] shows up among the callers of DerivedClass, so we're closing this as already fixed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants