Remove RootImportPath
This is an extension we added that we don't really need. We use it, and it has caused features to not work in vscode. I think we can just get rid of it. On sourcegraph.com the value is basically set by this snippet of code
// Put all files in the workspace under a /src/IMPORTPATH
// directory, such as /src/github.com/foo/bar, so that Go can
// build it in GOPATH=/.
if isStdlib {
langInitParams.RootPath = "file://" + goroot
} else {
langInitParams.RootPath = "file://" + "/src/" + h.rootImportPath
}
langInitParams.RootImportPath = h.rootImportPath
which means we can just rely on RootPath (except for special casing stdlib). Out of interest h.rootImportPath is empty for stdlib, and otherwise is detected based on the repo path / found package import doc strings.
https://sourcegraph.com/github.com/sourcegraph/go-langserver@7b4451f3b17c590d88cd39be546fc8772c3bddac/-/blob/langserver/lspx.go#L26:40
@slimsag, @sqs agree?
👍
👍