Skip to content

Drop SemanticDB output from semanticdb-javac (split 1/2)#896

Draft
jupblb wants to merge 1 commit into
mainfrom
michal/drop-semanticdb-java
Draft

Drop SemanticDB output from semanticdb-javac (split 1/2)#896
jupblb wants to merge 1 commit into
mainfrom
michal/drop-semanticdb-java

Conversation

@jupblb
Copy link
Copy Markdown
Member

@jupblb jupblb commented Jun 2, 2026

Part 1 of a 2-PR split of #891.

What this PR does

Replaces the legacy SemanticDB → SCIP conversion pipeline on the Java side with a direct, in-plugin SCIP shard emission flow. The Kotlin plugin keeps emitting SemanticDB for now and gains dual-emission so the new SCIP aggregator can read its data too. Part 2 (#TODO) drops Kotlin SemanticDB emission and removes the SemanticDB protobuf machinery entirely.

Pipeline before vs after this PR

Before:
  javac/kotlinc + plugin  ──►  *.semanticdb files  ──►  scip-semanticdb aggregator  ──►  index.scip

After:
  javac + plugin     ──►  *.scip shards  ─────┐
                                              ├─►  ScipShardAggregator  ──►  index.scip
  kotlinc + plugin   ──►  *.scip + *.semanticdb (dual)

Commits

15 commits, grouped:

  • M1-M8 + cleanup (9 commits): SCIP shard infrastructure — ScipShardWalker, SymbolRewriter, ScipVisitor (forked from SemanticdbVisitor), ScipSignatureFormatter, ScipShardAggregator, the opt-in --use-scip-shards CLI flag, snapshot stabilization, and making compiler-side SCIP emission the Java plugin default.
  • K1-K5 (5 commits): Kotlin SCIP infra + dual-emission + aggregator robustness fixes + CLI default flip to shard consumption + snapshot regen. (Necessary in this PR so the aggregator's now-default SCIP path still picks up Kotlin data while Kotlin SemanticDB output remains.)
  • D1-D2 (2 commits): ScipVisitor no longer references SemanticDB protobuf types; semanticdb-javac emits only SCIP shards.

What is NOT in this PR (deferred to #TODO)

  • D3: semanticdb-kotlinc emits only SCIP shards
  • D4: aggregator drops the SemanticDB fallback path
  • D5: drop the SemanticDB protobuf + dead builders
  • D6: scrub SemanticDB wording from docs and help text
  • 4 cleanup commits that simplify code only reachable after Kotlin's drop

Rebased onto origin/main (post #899's semanticdb-shared extraction).

- semanticdb-javac: replace SemanticDB protobuf emission with SCIP shards
  (ScipShardWriter/Aggregator/Occurrences/Symbols/Signatures + ScipVisitor).
- semanticdb-kotlinc: add the SCIP shard infrastructure alongside the
  existing SemanticDB code path (dropped fully in stacked PR B).
- scip-semanticdb: ScipShardAggregator walks per-source shards, applies
  SymbolRewriter, and merges into a single Index.
- Use the shared semanticdb-shared module's symbol/builder utilities.
@jupblb jupblb force-pushed the michal/drop-semanticdb-java branch from 2ec7b8c to 6c1901e Compare June 3, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant