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
Clone and open the delve project (github.com/go-delve/delve). There should be no diagnostics.
Open one of the files in _fixtures. Gopls is publishing ~570 compiler errors (mostly, DuplicateDecl)
Close the file. The diagnostics don't go away.
The directory _fixtures contain various files used for debugging. Depending on debugging scenario, mostly a single file is chosen to be built and debugged by tests. They are like testdata.
Directory and file names that begin with "." or "_" are ignored by the go tool, as are directories named "testdata".
I'd appreciate completion or single file mode diagnostics on the files, but not DuplicateDecl diagnostics.
Alternatives to consider
Provide an option to disable diagnostics on files in certain directories. -> Should this be editor's option?
Unpublish diagnostics once the files in _fixtures are all closed. -> Still distracting.
Ask users to use build tags. (//go:build ignore) -> at least, for delve, this will be a huge change since most tests are sensitive to file line number changes (e.g. setting breakpoint).
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
May 31, 2023
Gopls version: v0.12.0
How to reproduce
_fixtures
. Gopls is publishing ~570 compiler errors (mostly, DuplicateDecl)The directory
_fixtures
contain various files used for debugging. Depending on debugging scenario, mostly a single file is chosen to be built and debugged by tests. They are liketestdata
.According to the go command line doc https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns files in this directory are handled specially. But gopls's behavior doesn't seem to align with it.
I'd appreciate completion or single file mode diagnostics on the files, but not DuplicateDecl diagnostics.
Alternatives to consider
//go:build ignore
) -> at least, for delve, this will be a huge change since most tests are sensitive to file line number changes (e.g. setting breakpoint).The text was updated successfully, but these errors were encountered: