-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/tools/gopls: change links in hover for replaced modules #39532
Comments
@DmitriyVTitov Did you open the editor from the directory where the Here is the instruction for log capturing. https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#vs-code Thanks for the issue report. |
I'm not sure that I understood your question correctly. I have several folders in my VSCode workspace (Go, Flutter, JS). One of them (transflow.ru) uses local modules, which are located at: Here is the log:
|
@DmitriyVTitov Thanks for sharing more details. I think you were caught by #32394. The VS Code workspace is Currently suggested workarounds is to open only the |
Well I've deleted despite it's local package specified with I've already opened issue microsoft/vscode-go#3072 about Go to definition with Go 1.14. Maybe it's related. |
@DmitriyVTitov: Can you please run As for the pkg.go.dev links, those don't check for replace directives either, so that's a separate bug. Transferred this issue to the Go issue tracker, as this is definitely a |
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
got error:
|
Make sure you provide the |
|
This might be a PowerShell issue (https://stackoverflow.com/questions/26614969/how-can-i-pass-batch-arguments-with-dots-into-a-powershell-script). Looks like you may need to do something like |
You were right:
|
Glad that worked! Looks like the |
I don't see ERRORS no more, but 'Go to definition' do not work. When I deleted root |
Deleting the |
Sorry Rebecca, but I don't have time to switch extension on and off for now. I will continue to work without language server. |
Not a problem. I'll leave this issue open as a reminder to add regression tests that use replace directives. |
@stamblerre the
while the
Doesn't it mean the workspace roots used in two cases are different? |
Yes, it does seem like that's the case. |
There hasn't been much activity on this issue, and we have a few CLs planned to improve the workflow with replaced modules. The one thing left to address is the hover links showing up for the original module.
|
After some discussion, we've concluded that the hover links may still be useful, even if the module has been replaced. We can change the links to point to the replaced module, if possible, however. |
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersgo env
to get the go development environment detailsShare the Go related settings you have added/edited
Describe the bug
When I enable Go Language Server all my local Go modules become unavailable.
All these modules are local to project folder and are available using
replace
:But even struct
Server
which is defined at the very same package is unavailable as you may see at screenshot.The text was updated successfully, but these errors were encountered: