Add LSIF support
There are currently no pipelines.
To run a merge request pipeline, the jobs in the CI/CD configuration file must be configured to run in merge request pipelines and you must have sufficient permissions in the source project.
Created by: chrismwendt
Goals
The goal of this PR is to enable us in the Sourcegraph organization to upload LSIF data for the sourcegraph/sourcegraph repository to Sourcegraph.com.
The next goal (not for this PR) is to support other users uploading LSIF for their own repositories by GopherCon (July 24).
The kind of feedback that would be most helpful would be: pointing out problems with the architecture or usability. Here are some areas I'm looking for feedback on:
/upload
endpoint to admin access tokens, and keep the /request
endpoint open to normal users (or anonymous users, if the instance is public) cc @sourcegraph/core-services.api/lsif
, but I plan to move it under GraphQL cc @sourcegraph/core-servicesBackground https://github.com/sourcegraph/sourcegraph/issues/4692
Overview of implementation see lsif/README.md and lsif/server/README.md
Changelog Doesn't update the CHANGELOG because there's no LSIF-scope for access tokens yet, which is OK for an unannounced MVP that we try out for ourselves on the sourcegraph/sourcegraph repository https://sourcegraph.slack.com/archives/C0C324C91/p1562109046016800?thread_ts=1562105156.005000&cid=C0C324C91
Test plan
sourcegraph/codeintellify
lsif-tsc -p tsconfig.json --noContents --out data.lsif
env SRC_ENDPOINT=http://localhost:3080 SRC_ACCESS_TOKEN=$DEV_SRC_ACCESS_TOKEN REPOSITORY=github.com/sourcegraph/codeintellify COMMIT=$(git rev-parse HEAD) bash ~/path/to/sourcegraph/sourcegraph/lsif/upload.sh data.lsif
(currently fails at the upload step because I haven't figured out how to implement auth yet)TODO
/exists
before sending hover/def/ref requests/upload
endpoint to admins (in the future, we might create a new LSIF scope for access tokens)Potential future ideas (we can move select tasks into the TODOs above)
Database
cache, etc.To run a merge request pipeline, the jobs in the CI/CD configuration file must be configured to run in merge request pipelines and you must have sufficient permissions in the source project.