Commit e8245db
committed
Implement LSIF emitter in Java.
Previously, we shelled out to `lsif-semanticdb` to convert SemanticDB
files into LSIF. This commit ports the original Go implemementation to
Java so that we can call a normal method instead of shelling out to a
separate process.
The biggest problem with the previous solution is that it complicated
installation for users. As we evolve lsif-java, the conversion logic
will also evolve and we want to avoid the situation where users have
an outdated version of lsif-semanticdb installed. With this commit,
users only need to install `lsif-java` and everything should work
correctly.
This commit also adds a new `snapshot-lsif` command to pretty-print an
LSIF index, similar to how we pretty-print SemanticDB payloads. This
command is mostly useful for testing purposes, but could be helpful
to troubleshoot user issues.1 parent c6bbe47 commit e8245db
File tree
58 files changed
+2048
-232
lines changed- .github/workflows
- cli/src/main/scala/com/sourcegraph/lsif_java
- docs
- lsif-java/src/main/scala/com/sourcegraph
- io
- lsif_java
- buildtools
- commands
- lsif_semanticdb
- lsif-semanticdb/src/main
- java/com/sourcegraph/lsif_semanticdb
- protobuf
- semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac
- semanticdb-java/src/main
- java/com/sourcegraph/semanticdb_javac
- protobuf
- tests
- benchmarks/src/main/scala/benchmarks
- snapshots/src
- main
- generated
- index-semanticdb
- scala/tests
- test/scala/tests
- unit/src
- main/scala/tests
- test/scala/tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
58 files changed
+2048
-232
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
67 | 78 | | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
71 | | - | |
| 82 | + | |
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| |||
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| 102 | + | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| |||
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
111 | | - | |
112 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
113 | 127 | | |
114 | | - | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
| 131 | + | |
116 | 132 | | |
117 | 133 | | |
118 | | - | |
| 134 | + | |
119 | 135 | | |
120 | 136 | | |
121 | 137 | | |
| |||
128 | 144 | | |
129 | 145 | | |
130 | 146 | | |
131 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
132 | 152 | | |
133 | 153 | | |
134 | 154 | | |
| |||
161 | 181 | | |
162 | 182 | | |
163 | 183 | | |
164 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
165 | 189 | | |
166 | 190 | | |
167 | 191 | | |
168 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
169 | 203 | | |
170 | 204 | | |
171 | 205 | | |
| |||
264 | 298 | | |
265 | 299 | | |
266 | 300 | | |
| 301 | + | |
267 | 302 | | |
268 | 303 | | |
269 | 304 | | |
270 | 305 | | |
271 | 306 | | |
272 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
273 | 332 | | |
274 | 333 | | |
275 | 334 | | |
| |||
279 | 338 | | |
280 | 339 | | |
281 | 340 | | |
282 | | - | |
283 | 341 | | |
284 | 342 | | |
285 | 343 | | |
| |||
334 | 392 | | |
335 | 393 | | |
336 | 394 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| |||
Lines changed: 0 additions & 55 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
67 | 74 | | |
68 | 75 | | |
69 | 76 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | | - | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments