Skip to content

Commit 01ab459

Browse files
committed
Clear symbols table before readding entries
1 parent 3e1a5b0 commit 01ab459

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

server/src/main/kotlin/org/javacs/kt/index/SymbolIndex.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ class SymbolIndex {
3535
LOG.info("Updating symbol index...")
3636

3737
try {
38+
val descriptors = allDescriptors(module)
39+
40+
// TODO: Incremental updates
3841
transaction(db) {
39-
for (descriptor in allDescriptors(module)) {
42+
Symbols.deleteAll()
43+
44+
for (descriptor in descriptors) {
4045
val fqn = descriptor.fqNameSafe
4146

42-
Symbols.insert {
47+
Symbols.insertIgnore {
4348
it[fqName] = fqn.toString()
4449
it[shortName] = fqn.shortName().toString()
4550
it[kind] = descriptor.accept(ExtractSymbolKind, Unit).rawValue

0 commit comments

Comments
 (0)