Description
Summary
Lua colon-method calls (obj:method()) are never recorded as call edges. A call to a sibling method via self:other() — the standard way one method of a Lua "class" (metatable) invokes another — is silently dropped from the call graph. Dot calls (M.helper()) and plain calls (helper()) work; only the colon form is affected.
Version / commit
v8 @ ef4450d (v0.9.73)
Environment
macOS (darwin 24.6), Python 3.13, tree-sitter-lua via default uv sync.
Minimal reproduction
-- animal.lua
local Animal = {}
function Animal:speak()
return self:describe()
end
function Animal:describe()
return self.name
endfrom graphify.extract import extract
r = extract(["animal.lua"])
calls = [(e["source"], e["target"]) for e in r["edges"] if e["relation"] == "calls"]Expected
A calls edge Animal:speak → Animal:describe.
Actual
No calls edge is emitted. Both methods are present as nodes, but the colon call between them is dropped.
Root cause
A colon call parses as a method_index_expression whose callee is in the method field and whose receiver is in the table field. _LUA_CONFIG set call_accessor_field="name" (and no object field), so child_by_field_name("name") returned None and the callee name was never captured.
Scope
A clean checkout reproduces. self: receivers can be resolved against the enclosing method's own table; an arbitrary-object receiver (other:m()) stays unresolved (no false binding).
Activity
github-actions commentedon Oct 2, 2026
Thanks for opening this issue, @rajatnagda45. 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.
fix(lua): resolve colon-method calls (obj:method())
fix(extract): treat Luau as Lua family in the engine's Lua-only paths (…