fix(groovy): dispatch juxt_function_call in both engines#1124
Conversation
Groovy command-style calls (`foo bar(x)`, Gradle DSL `task someTask { ... }`,
`apply plugin: 'java'`, etc.) parse as `juxt_function_call` nodes, which
neither the JS source-of-truth extractor nor the Rust port was dispatching —
so these call edges were silently dropped from the call graph in both
engines.
The juxt node has a `name` field with the same shape as `method_invocation`,
so adding it to the existing dispatch in `walkGroovyNode` /
`match_groovy_node` is sufficient — the existing call handler picks up the
callee without further special-casing.
Closes #1108
|
Claude finished @carlos-alm's task —— View job ✅ PR Review CompleteReviewing PR #1124: fix(groovy): dispatch juxt_function_call in both engines Review Checklist:
Phase 1: Root Cause Analysis ✅Problem Being Solved: Both TypeScript and Rust extraction engines were silently dropping Groovy command-style function calls (e.g., Why This Approach: The fix correctly identifies that Risk Assessment: ✅ Low risk - minimal change, addresses clear gap in AST node coverage, both engines updated in parallel. Phase 2: Configuration Change Detection ✅No High-Risk Changes Detected:
Phase 3: Test Integrity ✅Strong Test Coverage:
Phase 4: Code Quality ✅Implementation Analysis:
Phase 5: Backlog Compliance ✅
Root Cause AnalysisProblem Being Solved: Missing extraction of Groovy command-style calls (juxt_function_call AST nodes), causing incomplete dependency graphs for Gradle builds Backlog Compliance
Final Recommendation
|
Greptile SummaryThis PR fixes a silent omission in both the TypeScript and Rust Groovy extractors where
Confidence Score: 5/5Safe to merge — the change is a minimal one-liner addition in each engine that routes a previously unhandled node kind to an already-correct handler. Both engines' existing No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Tree-sitter Groovy AST node] --> B{node.kind}
B -->|method_invocation\nmethod_call\ncall_expression\nfunction_call| C[handle_call_expr / handleGroovyCallExpr]
B -->|juxt_function_call\n✅ NEW| C
B -->|object_creation_expression| D[handle_object_creation]
B -->|class / interface / enum\nmethod / function / import| E[other handlers]
C --> F{has 'name' field?}
F -->|yes - juxt_function_call\nmethod_invocation| G[Extract name + optional object receiver → push Call]
F -->|no| H{has 'function' / 'method' field?}
H -->|field_expression / member_access| I[Extract field + obj receiver → push Call]
H -->|identifier| J[Use funcNode.text → push Call]
Reviews (1): Last reviewed commit: "fix(groovy): dispatch juxt_function_call..." | Re-trigger Greptile |
Codegraph Impact Analysis3 functions changed → 1 callers affected across 1 files
|
Summary
foo bar(x), Gradle DSLtask someTask { ... },apply plugin: 'java',println "hi", etc.). The grammar emits these asjuxt_function_call, which neitherwalkGroovyNode(src/extractors/groovy.ts) normatch_groovy_node(crates/codegraph-core/src/extractors/groovy.rs) dispatched.namefield with the same shape asmethod_invocation, so wiring it into the existing call handler is enough — no new handler needed.apply,task,println).Test plan
cargo test -p codegraph-core extractors::groovy— 8/8 pass (incl. newextracts_command_style_juxt_calls)npx vitest run tests/parsers/groovy.test.ts— 6/6 pass (incl. newextracts command-style (juxt) function calls)Closes #1108