Closed alcortesm closed 1 year ago
Build constraints effectively hide the Go file from the go
tool and many related tools when the constraints are not satisfied with build tags. With only one file and that file has a build constraint, but not tags are being used, that effectively tells the tooling that there are no Go files to check.
But how can I know for sure? maybe it would be good to have a :GoVersion command that returns the vim-go version.
That's not quite as easy as you might think for a variety of reasons. What you've provided here is enough to know the version of vim-go that you're using.
thanks!
What did you do? (required: The issue will be closed when not provided)
I ran
:GoDiagnostics
on a Go test file. The file has a build tag and the package doesn't have any other go files.Steps to reproduce, starting on an empty directory:
What did you expect to happen?
Vim will run the diagnostics in the file and retun success:
What happened instead?
A vim error:
Configuration (MUST fill this out):
vim-go version:
I guess v1.28, since it is the current release and I'm installing vim-go using vim-plug, and I run
:PlugUpdate
prior to this report.But how can I know for sure? maybe it would be good to have a
:GoVersion
command that returns the vim-go version.vimrc
you used to reproduce:vimrc
```vim call plug#begin('~/.vim/plugged') Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } call plug#end() ```Vim version (first three lines from
:version
):Go version (
go version
):Go environment
go env
Output:gopls version
gopls version
Output:My Own Investigation
If I add a simple regular Go file to the package, the
:GoDiagnostics
starts working fine again:If I remove the non-test go file,
:GoDiagnostics
fails again.