You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Call-graph reference: evaluate SCIP on Java as a shared route for several languages #3783
SCIP (Sourcegraph's code-index format) has indexers for TypeScript, Java, Go, Python, C# and Rust. A SCIP index records every definition and every reference occurrence, with symbol identity. A call edge follows from a reference occurring inside a function definition's range. One SCIP adapter could therefore cover many languages. #3332 originally proposed scip-java, scip-typescript and scip-go.
Evaluate on Java
Setup: run scip-java on google/gson (pinned in tests/import_graph_corpus.json) and write the SCIP → contract adapter.
Quality: is a reference the same as a call? Exclude type references, and keep only references in call position.
Cost: SCIP indexers need a buildable project with its dependencies installed (Maven or Gradle). That means network access and CI time. Measure both.
Cross-check: compare SCIP's TypeScript output on zod against ts_callgraph.js, to learn how far SCIP-derived edges can be trusted.
Decision
Adopt SCIP for the remaining languages, or stay with native per-language tools. Record the decision here.
TypeScript stays on tsc. The cross-check of scip-typescript 0.4.0 against ts_callgraph.js on zod, through the same adapter:
96.5% of SCIP's own edges are in tsc's graph too, so its edges are trustworthy;
it covers only 52.4% of tsc's edges;
88% of that gap is callers SCIP has no definition for: member assignments (inst.refine = …), quoted keys, and object-literal methods.
Cost:
Java: about 45 seconds per gson build once cached. The first fetch of the scip-java jars takes about 25 seconds.
Maven Central rate-limits bursts with 429s. MAVEN_FLAGS retries, and CI caches ~/.m2 and the jars.
scip-typescript: 33 seconds on zod.
For the remaining languages: run the documented compare cross-check whenever a native reference exists. Adopt SCIP where there's none and the indexer records kinds and extents; Go, C# and C/C++ are the next candidates.
Activity
SCIP call-graph adapter; Java measured vs scip-java; SCIP-vs-tsc cros…
squid-protocol commentedon Sep 26, 2026
Decision: use SCIP where the indexer runs the compiler and records definitions fully; keep a native adapter where it sees more
The evaluation is in #3838.
semanticdb-javacplugin, thenindex-semanticdb.scip-java indexitself broke on gson's-Werrorbuild.enclosing_range, which is everything the shared adapter (tests/tools/scip_callgraph.py) needs.ts_callgraph.json zod, through the same adapter:inst.refine = …), quoted keys, and object-literal methods.MAVEN_FLAGSretries, and CI caches~/.m2and the jars.comparecross-check whenever a native reference exists. Adopt SCIP where there's none and the indexer records kinds and extents; Go, C# and C/C++ are the next candidates.Generated by Claude Code
SCIP call-graph adapter; Java measured vs scip-java; SCIP-vs-tsc cros…