-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: hangs while loading the workspace #42081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@adityaramani I guess you are using the language server. ( https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#vs-code |
I am also running into this issue as well. Here are the settings for my remote: "go.autocompleteUnimportedPackages": true,
"go.gopath": "/home/myuser/go",
"go.goroot": "/home/myuser/sdk/go1.15.3",
"go.testFlags": [
"-v"
],
"go.languageServerExperimentalFeatures":{
"diagnostics": false,
"documentLink": true
},
"go.languageServerFlags": [
"serve",
"-rpc.trace",
"--debug=localhost:6060"
],
"go.useCodeSnippetsOnFunctionSuggest": false,
"go.useLanguageServer": true,
"go.formatTool": "goimports",
"go.gotoSymbol.includeImports": true,
"go.gotoSymbol.includeGoroot": true,
"go.buildOnSave": "off",
"go.lintOnSave": "off",
"go.vetOnSave": "off",
"files.eol": "\n", And here are the logs from gopls (server):
I've tried my best to isolate the issue to a specific behavior on my end, but I've come up empty. Sometimes switching to different projects works after running Would love assistance here, as it completely derails my go workflow. |
@adityaramani: Can you reproduce this in a public project or only in a private one? What is the output of |
A few extra details: It does appear to only be happening in one specific workspace. I actually deleted a generated source file and fixed up some broken imports, and it eventually started back correctly after Restarting the Language Server and Reloading VS Code. I then added back the offensive file, and everything was fine. It looks related to broken imports (referencing a different project that isn't added to go.mod). It's a private workspace which I don't feel comfortable sharing in the public bug report, but if there's another way I could share privately, I would gladly oblige if it means getting to a fix faster. While in the "stuck" state, I ran
|
If I pull back in the problematic file with a "bad import", it recreates the issue. Hopefully providing some more useful information here. One of imports references a module that is a private github repository (in this case, it was an incorrect import designed to be a placeholder from a source generation template). I am going to try and run The reason I bring this up because it seemed possible that the extension might try to reach out and pull in referenced packages. For private repositories, we've had to use |
I ran
These are the logs from my gopls (server)
And code navigation does not seem to work only on this workspace, my other workspaces seem to be working fine. |
I can 100% reproduce the issue by including a source file that points to a package import from a private repository that doesn't exist in |
I thought that removing this setting would actually move us forward, but it appears that's not the case.
It does appear that the existence of the source in |
Thanks again for the help with this issue. I found one possibly related issue for |
@mbolt35: Have you tried configuring the |
I've created a video response which shows basic reproduction steps, and also demonstrates an issue that I believe may be related. I apologize for the lack of brevity, as I wanted to ensure I was being clear in the cases. |
@stamblerre I had no idea that existed! Thank you very much, this will help tremendously with our workflow :) |
@mbolt35: Thank you for that detailed repro! That makes things a lot clearer, we will try to investigate the issue. |
I've just revisited this to try to reproduce, and I'm afraid I'm not able to. The first issue that you point out is still a problem, but I think it will be addressed by #38462 (right now, we try to reload packages whenever an import statement is changed, but if we switch to |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Issue Type: Bug
As soon as I load up my remote workspace, the bottom status bar reports the above message and it does not seem to resolve itself.
Not able to use any features like find definition or cmd + click to go to def.
Strangely this is happening only in this particular workspace, on all other workspaces everything loads fine
Extension version: 0.17.2
VS Code version: Code - Insiders 1.51.0-insider (2ed16d0ce8713a5dfed9729071141be0ccf7fbec, 2020-10-14T05:48:54.391Z)
OS version: Darwin x64 18.7.0
Remote OS version: Linux x64 4.19.46-4.19.1-amd64-9cf031ffa09555f2
Remote OS version: Linux x64 4.19.46-4.19.1-amd64-9cf031ffa09555f2
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: