You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Considering the following govimtestscript in which I attempt a completion in a file that does not completely type-check:
vim ex 'e main.go'
vim ex 'call cursor(5,1)'
vim ex 'call feedkeys(\"A\\<C-X>\\<C-O>\", \"x\")'
-- go.mod --
module mod.com
-- main.go --
package main
func main() {
cmd := exec.Command("ls")
out, err := cmd.
}
What did you expect to see?
I think I would expect this call to simply return zero results, i.e. for there to be no completion candidates.
What did you see instead?
An error returned by gopls:
cannot resolve cmd
The reason I think this is wrong is that I'm otherwise unclear how we would distinguish between a more fundamental, low-level error and the case of there simply being no completions because of either a type-check error/some other reason.
But very much look to @stamblerre and @ianthehat for their thoughts on what is right/wrong here.
The text was updated successfully, but these errors were encountered:
Yes, I think you're right here. We also return errors for signature help in case where there just isn't anything we can offer. I'll fix it so we only return errors when something is really wrong.
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?
Considering the following
govim
testscript
in which I attempt a completion in a file that does not completely type-check:What did you expect to see?
I think I would expect this call to simply return zero results, i.e. for there to be no completion candidates.
What did you see instead?
An error returned by
gopls
:The reason I think this is wrong is that I'm otherwise unclear how we would distinguish between a more fundamental, low-level error and the case of there simply being no completions because of either a type-check error/some other reason.
But very much look to @stamblerre and @ianthehat for their thoughts on what is right/wrong here.
The text was updated successfully, but these errors were encountered: