cmd/gopls: avoid Command 'gopls.generate' failed: Error: All files must be saved first #66957
Labels
gopls
Issues related to the Go language server, gopls.
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Use VScode, switch between branches. Some files remain open that may not exist on the new branch. VScode shows these as missing (red icon).
What did you expect to see?
go generate
runs. gopls should be able to differentiate between unsaved and missing files.What did you see instead?
Running
gopls.generate
creates an error since it thinkgs the workspace is dirty- which it isn't in this case.The text was updated successfully, but these errors were encountered: