☂ ️ Code intel paper cuts
Created by: beyang
I've encountered several code intel errors/bugs this morning in https://sourcegraph.com/github.com/sourcegraph/sourcegraph that have made the Sourcegraph user experience quite frustrating to the point where I no longer feel like Sourcegraph is adding to my productivity. Here is a sampling:
I have the following user settings:
"lang-go.accessToken": "REDACTED",
"go.accessToken": "REDACTED",
"go.showExternalReferences": true
"go.serverUrl": "wss://go.sourcegraph.com"
"extensions': {
"farhan/go-imports-search": false,
"sourcegraph/go": true,
"sourcegraph/go-imports-search": true,
}
- With LSIF enabled, go here and click on the
Tracerfield in theTracerstruct. Note that there is a reference to this field in the very same file.
- First time, the tooltip window takes forever (more than a minute?) to pop up. There is no indication that anything is happening in the interim.
- Sometimes the tooltip window has a "find references" button
- Sometimes it doesn't.
- When it does, I click on "find refs" and see "no references".
- Then I wait a minute (as I'm typing this issue actually), and references pop up.
- Now, after another minute, the "find references" button has disappeared (I don't think I've touched the UI in the interim).
- It often takes awhile for the tooltip to show up at all, and then it might be missing the "Find references" button.
- With LSIF enabled, go here and click on
opentracing.Tracer.
- Sometimes I get a hover, but no jump-to-def or find-references button. How does it serve me a tooltip without a corresponding j2d? And even if it can't j2d (because it's an external def), shouldn't it at least show me find-refs in the same repo.
- Sometimes a "Go to definition" button pops up, but only briefly, then goes away.
- Sometimes, the tooltip itself seems to go away, and then I try clicking around on surrounding definitions, and nothing works for a few seconds. It feels like something has been killed and needs to restart before it comes back online.
-
Tracer.New has a whole bunch of references, but not "Find references" button appears.
Now, I add "codeIntel.lsif": false, to my user settings.
- Go to traceutil.go.
- No hovers show up initially.
- Hovers show up after what feels like 30s of waiting. Falling back to language server, presumably? This feels longer than it used to take.
- Now references show up. References in general take awhile to populate. (20 seconds?)
- After reload, the tooltips pop up fairly quickly, but show the spinner. This at least tells me something is making progress.
- Jump to external defs work!
- Now, after leaving the page alone for awhile, I come back, and "Find references" button no longer shows up...
- Works on refresh, but you gotta wait for what feels like reinitialization.
I am leaving LSIF disabled for now, because I feel on the whole it is a better experience, even with the warts described above.
Meta question: I encounter these types of issues extremely often now, and it feels like it has gotten worse over the last few months. Are we dogfooding our own product enough here?
