Skip to content

[Bulk index][Java] Export compiler and JDT workspace snapshots without query fanout #74

Description

@samchon

Problem

JDT LS imports Maven/Gradle projects and exposes strong editor queries, but it has no stock request that exports every declaration and relationship in one response. The generic scan therefore pays editor-query overhead after JDT has already indexed the workspace.

Evidence and decision

  • Eclipse JDT LS is extensible and build-aware, but its public feature set is point/document/workspace queries rather than a complete graph dump.
  • scip-java integrates with Java builds and emits per-source-file SCIP shards; Scala/Kotlin paths may consume their own compiler/SemanticDB artifacts but Java output is not “Javac SemanticDB.”

Decision: use scip-java's Java SCIP shards as the initial bulk lane. Avoid a JDT LS fork. If strict graph fields are absent, implement a compiler plugin/sidecar or JDT LS OSGi extension bundle using Java Model, AST bindings, and SearchEngine; choose by a feasibility fixture rather than calling the artifact SemanticDB.

Approach

  1. Detect Maven, Gradle, Bazel, or explicit compiler configuration and prepare dependencies/generated sources without modifying tracked files.
  2. Run the matching scip-java integration and adapt its SCIP/SemanticDB artifact.
  3. Enrich Java-specific packages, nested/anonymous/local classes, overload signatures, constructors, fields, annotations, imports, calls, allocations, inheritance, interface implementations, overrides, lambdas/method references, visibility, tests, and exact spans from compiler identities.
  4. Represent multi-module build targets and duplicate source roots without name-based merging.
  5. Retain JDT LS as fallback and optional resident diagnostics, never as a second conflicting semantic authority for the same generation.

Incremental strategy

scip-java emits per-source SCIP shards, but shard production alone does not prove correct incremental dependency invalidation. Milestone 1 reruns the build-aware exporter and atomically replaces the Java slice. Milestone 2 may reuse verified changed shards plus reverse-dependent relations through compiler/JDT workspace invalidation. Classpath, compiler options, annotation processors, module descriptors, or build-graph changes force a wider or full generation.

Acceptance and verification

  • Maven and Gradle multi-module fixtures cover packages, imports, overloaded/generic methods, anonymous/local classes, lambdas, method references, records, enums, sealed types, annotations, inheritance/overrides, generated sources, and tests.
  • Annotation processors and generated sources are attributed without indexing build output as handwritten source.
  • Same-name overloads and modules stay distinct.
  • Source/build/classpath changes, failed compilation, stale SCIP shards, retry, and unchanged refresh are atomic.
  • Real Gson smoke has non-zero calls, allocations, annotations, implementations, tests, and cross-file edges without per-symbol JDT requests.
  • JDT LS fallback and experiment remain valid.
  • Focused tests, Java experiment, pnpm test, and pnpm coverage pass.

Coordination

Depends on exact application parity, provider identity, provider registry, project transaction, conformance harness, and strict SCIP adapter. Share only the SemanticDB/SCIP plumbing with Kotlin and Scala; keep Java preparation and language semantics in this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions