Skip to content

[feature request] infer index root by reading scip metadata

Created by: ckipp01

Currently using using src to upload a SCIP file it assumes that the root is the directory the actual directory the index is in. You can see this in:

https://github.com/sourcegraph/src-cli/blob/c0cad1aa5b628f0d88330291387bc20494861178/cmd/src/code_intel_upload_flags.go#L320-L325

There are situations where an integrations may spit this file out not in the root of the dir. Then when you upload you need to ensure you're setting -root or it may be inferred incorrectly.

As an alternative I'd be great if this could just be pulled form the project_root field of the metadata in the scip protocol. This would allow for an upload that is uploading a scip.index file not in the root to also not have to define the -root flag.