Commit a244bfe
committed
PR1 (M8): Make compiler-side SCIP shard emission the default
After M3-M7 the per-source SCIP shard format is stable and the
ScipShardAggregator produces equivalent output to the legacy
SemanticDB->SCIP path. This commit promotes the cheap compiler-side
half of the dual-emission to be on by default so that:
- any javac plugin invocation (sbt, Maven, Bazel, ad-hoc) writes a
*.scip shard under META-INF/scip/ alongside the *.semanticdb file
without needing an explicit -emit-scip:on flag;
- users (or build tools) that want to consume the new path only need
to flip the CLI switch (--use-scip-shards) once the indexer runs;
- legacy callers that only read *.semanticdb files are unaffected.
The CLI default for index-semanticdb's --use-scip-shards remains false
because the broader ecosystem (notably the Kotlin compiler and the
existing snapshot/build tool integrations) still produces only
*.semanticdb. That flip is deferred to a follow-up PR.
semanticdb-javac:
- SemanticdbJavacOptions.emitScip defaults to true. -emit-scip:off
is now the explicit opt-out and is documented as the legacy path.
scip-java:
- SnapshotCommand: skip per-source shards (those without a
metadata.project_root) so 'scip-java snapshot' continues to render
only the top-level aggregator output. Per-source shards have no
project_root and would otherwise crash with 'missing scheme'
when their relative paths are resolved into a URI.
build.sbt:
- Drop the now-redundant -emit-scip:on flag from the minimized
project; the plugin default already emits shards.
tests/unit:
- ScipShardEmissionSuite: invert the off-path test so it explicitly
passes -emit-scip:off; the previous test relied on the old
default of false.
Full snapshot suite (102 tests) and unit suite (30 tests) green.1 parent eab3f1c commit a244bfe
4 files changed
Lines changed: 42 additions & 30 deletions
File tree
- scip-java/src/main/scala/com/sourcegraph/scip_java/commands
- semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac
- tests/unit/src/test/scala/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
554 | 553 | | |
555 | 554 | | |
556 | 555 | | |
| |||
Lines changed: 29 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
66 | 76 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | | - | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| |||
0 commit comments