3 months ago
7f91ec8Go methods were indexed as just the method name (e.g. "Save"), so same-named methods on different types (Foo.Save, Bar.Save) collided in the symbol graph. Call edges via receiver variables (f.Save()) resolved to the last-inserted "Save" symbol — targeting the wrong type. Fix: qualify method symbol names as Type::Method (e.g. Foo::Save) and qualify call callees through the receiver variable as Type::method (e.g. f.Validate() → Foo::Validate). This matches the existing regex parser behavior in languages.ts. Changed in both parsers: - packages/native/src/parser.rs (Rust tree-sitter): - Add go_receiver_name and go_receiver_type helpers - Qualify method name with receiver type - Track receiver (var, type) in context stack - Qualify calls through receiver variable - packages/indexer/src/tree-sitter/parse.ts (TS tree-sitter): - Add goReceiverName and goReceiverType helpers - Qualify method name with receiver type - Pass receiver info to extractCallsInNode - Qualify calls through receiver variable - tests/tree-sitter-parser.test.ts: - Update expected symbol name: Greet → Greeter::Greet Typecheck 8/8, tests 144 pass. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Parent446ae79