Skip to content

fix(jvm): resolve mixed Java/Kotlin callgraph edges#684

Open
nguyentamdat wants to merge 1 commit into
DeusData:mainfrom
nguyentamdat:java-kotlin-callgraph
Open

fix(jvm): resolve mixed Java/Kotlin callgraph edges#684
nguyentamdat wants to merge 1 commit into
DeusData:mainfrom
nguyentamdat:java-kotlin-callgraph

Conversation

@nguyentamdat

@nguyentamdat nguyentamdat commented Jun 29, 2026

Copy link
Copy Markdown

Summary

  • infer JVM namespaces from src/main/java, src/main/kotlin, src/test/java, and src/test/kotlin roots for Java/Kotlin files
  • preserve inferred namespace metadata in LSP definition cache entries so same-package JVM definitions survive cross-file filtering
  • compare textual callees by leaf method name when applying LSP overrides, including the parallel lsp_idx path
  • add a mixed Java/Kotlin regression that asserts strategy: lsp edges for Java -> Kotlin and Kotlin -> Java calls

Verification

  • make -f Makefile.cbm test -> 5726 passed

Notes

Split out from the original bundled branch so this PR now contains only the JVM callgraph fix. The low-RAM indexing change is now separate in #685.

Before: Java/Kotlin cross-file LSP emitted package-shaped JVM names while graph nodes stayed path-derived, and member calls like receiver.method did not consume LSP overrides.

After: Java and Kotlin share package-indexed JVM defs across mixed Gradle/Maven source roots, normalize JVM defs to declared packages for LSP registries, consume qualified member-call overrides by leaf name, and assert both Java-to-Kotlin and Kotlin-to-Java lsp CALLS edges.

Why: /home/dat/ica/server mixes src/main/java and src/main/kotlin in the same JVM packages; path-prefix filtering missed same-package defs and fallback suffix matching produced weaker or wrong call edges.

Verify: make -f Makefile.cbm test -> 5705 passed.
Signed-off-by: nguyentamdat <nguyentamdat@gmail.com>
@nguyentamdat nguyentamdat force-pushed the java-kotlin-callgraph branch from e6f8c2a to f33f068 Compare June 29, 2026 07:01
@DeusData

Copy link
Copy Markdown
Owner

Huge thanks for opening this PR and for the work you put into it.

The maintainer shop is currently full, so this may sit for a bit before it gets a proper review. We will come back to this as soon as possible with real feedback; I wanted to make sure it did not sit unacknowledged in the meantime.

@DeusData DeusData added bug Something isn't working parsing/quality Graph extraction bugs, false positives, missing edges priority/normal Standard review queue; useful PR with ordinary maintainer urgency. labels Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working parsing/quality Graph extraction bugs, false positives, missing edges priority/normal Standard review queue; useful PR with ordinary maintainer urgency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants