LSIF: multi-lang/project support
Created by: chrismwendt
This adds support for multi-lang/project repositories by introducing the concept of a root associated with each LSIF dump.
- The root is the path prefix into the repository at which the LSIF dump is mounted.
- The empty string is a valid root.
- If you upload a new LSIF dump for the same repo@commit, any existing LSIF dump with a root that is a prefix of the new LSIF dump's root (or vice versa) gets deleted. This retains the ability for users to reupload and overwrite dumps for the same commit.
- Nearest-commit lookup takes into account the root and only returns dumps that contain the given file path.
Implements a simplified form of RFC 24: LSIF for multi-project repositories: https://docs.google.com/document/d/1ocoxE_Jnee70_RjQEFSz58jxRE3VZuNg9OGHvu68O6o/edit#heading=h.7i5nt52rbb8l
Linking to prerequisite PR: ID-based filenames https://github.com/sourcegraph/sourcegraph/pull/5963
TODO
-
Translate to/from paths within the LSIF dump by prepending/stripping the root to/from file paths -
Add test