API to upload LSIF artifacts

Problem to solve

To natively offer code navigation in GitLab we need to understand the structure of the code stored in GitLab. But we don't have this information stored in GitLab.

When I clone a repository to view in my local editor, I don't get code intelligence until I install the entire developer tool chain. Using LSIF it is possible to view code intelligence immediately (https://github.com/Microsoft/vscode-lsif-extension)

Intended users

Further details

LSIF (Language Server Index Format) makes it possible to statically dump code intelligence data typically served by a language server into a static file.

If we provided an API for upload, LSIF data could be generated and uploaded by a CI job.

Future iteration: If we provided an API for download, LSIF data could be used by:

  • GitLab for web based code nav
  • developers for local code nave
  • tools like Sourcegraph to save them needing to clone the repo and generate the LSIF file themselves

Proposal

  • Add an API to upload an LSIF for a specific SHA

Permissions and Security

Developers and above should have permission to upload LSIF data for any commit

Documentation

Testing

What does success look like, and how can we measure that?

We should measure simple usage with:

  • count of projects with LSIF artifacts uploaded in last 30 days
    • this number is important for determining if usage is sustained

What is the type of buyer?

Developer, therefore this feature should go in Core.

Links / references

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖