-
Notifications
You must be signed in to change notification settings - Fork 328
Description
Swift version
No response
Platform
No response
Editor
No response
Description
I've written a notes.rtf in case it helps, but basically the issue I have is here
Porting it over here to make it easy:
For example, lets say I had var foo : bar and did a hover over bar (This is inside file A), and that would show something like Loading… for a few sec, and show final class bar after. Lets say I did a go to def on bar here. If I come back immediately to the file A and do a hover over again, I’d expect final class bar to show up relatively quick. However, with my sklsp, I’ve been realizing that’s not really the case here. It will get stuck at loading again. This was weird, and I was wondering if I was somehow resetting the sklsp and its state. Instead of go-to-def, I just added an invalid print statement, didn’t save it or anything, and it took forever for red squiggles to appear + hovering over the symbol resulted in loading… again.
No errors or crashes, although I did notice textDocument/diagnostic take 10 secs from the trace in my logging. I did also notice a sourcekitd_send_request-before for the file I’m working on, but my key.compilerargs list is long… super long (4k + lines)
To summarize:
Just doing a go-to-def seemed to be causing this “reset”, so I had suspicion that my build server was somehow feeding the flags to sklsp again causing a “reset”
I ensured that was not the case, so I’m now suspecting that there’s something else that gets sent, but the trace log is too noisy for me to filter out effectively
When I say "failure" for my go to def, I mean the subsequent go-to-defs take super long time when I haven't made much change to the file. For example, subsequent go-to-defs to the same symbol is taking 10+ seconds.
Is this kind of “resetting” slowness expected? (I’d assume not). Is this “refreshing” the normal behavior, even without the presence of my buildsystem doing anything? (My instinct is yes, it is because it needs to refresh diagnostics when a user is working on the project, of course, but just a sanity check)
If so, what exactly is the request I can look for that is causing this “refresh”?
Are go-to-defs or hover overs etc not cached at all internally within sklsp?
What other things can I do to attempt to debug this issue?
I've attached the diagnose bundle (unfortunately at the public sensitivity level), but please let me know if theres anything I can do to help diagnose / root cause this. Thank you!
Steps to Reproduce
No response
Logging
log.txt
Notes.rtf
swift-versions.txt
sourcekit-lsp-34715.0.log