-
Notifications
You must be signed in to change notification settings - Fork 646
blank *.go files break gopls #3065
Comments
@cornfeedhobo thanks for the report. Unfortunately I couldn't reproduce it myself so more info about your set up will be helpful in triaging the issue
thanks!! |
@cornfeedhobo: Are you using Go 1.13? This is a known issue that is fixed in 1.14. Unfortunately, there's nothing we can do to work-around it until users upgrade to 1.14. The best solution would be to add a package declaration to that file and and save. |
Thanks a lot @stamblerre. @cornfeedhobo is using 1.12. 1.14 will be out this week. Please give it a try. |
Makes sense. I'm going to close this issue, since it is a known issue with a solution for later versions of Go. Thank you for the report, @cornfeedhobo! For reference, there is an upstream issue tracking this more generally: golang/go#36960. |
@stamblerre Thanks for the info. Correct, as @hyangah said, I'm using 1.12, which is the highest that SuSE currently packages. I might switch to a newer go version with Thanks again for all the hard work everyone! |
Uh oh!
There was an error while loading. Please reload this page.
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersgo env GOOS GOARCH
to get the operating system and processor arhcitecture detailsShare the Go related settings you have added/edited
Describe the bug
gopls
stops all meaningful output when a*.go
file is created that does not have apackage ...
header.Steps to reproduce the behavior:
Bonus steps:
5.
echo 'package main' > foobar.go
6. Edit any of the go files and see that gopls remains "broken"
7. restart vscode
8. Verify gopls is working as expected again
The text was updated successfully, but these errors were encountered: