This is a prototype implementation of SymbolIndex that works on top of SQLite databases created by https://github.com/xeno-by/scalameta/tree/topic/language-server. The code will need significant work before becoming merge-worthy, but nonetheless I wanted to share it with you guys asap to discuss associated design decisions.
The first couple commits tune the existing infrastructure to work well on huge codebases that don't necessarily conform to the SBT project layout. Nothing much to say here - the diffs should be self-explanatory.
The remaining commits factor out the SymbolIndex contract, move the existing SymbolIndex into InMemorySymbolIndex and establish SqliteSymbolIndex. SqliteSymbolIndex hasn't yet reached feature-parity with InMemorySymbolIndex, but even in its current form it is confirmed to provide instantaneous responses to textDocument/definition and textDocument/references requests with negligible memory requirements even on huge codebases.
olafurpg left a comment
Memory usage is tiny too, big win.
Since we're still experimenting I think it's great to have keep both in-memory and sql indices. It makes it easy to add a third implementation if we get a new idea. Once we find something more stable that we like a lot then we should consider settling on that approach and remove competing implementations.