Warning of missing fields when using build constraints #3270
Labels
FeatureRequest
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.863d2581ecda6849923a2118d93a088b0745d9d6
arm64
Go: Locate Configured Go Tools
command.gopath: /Users/foo/go
GOROOT: /usr/local/go
Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Workspace settings:
Describe the bug
There are several variants of the structure for different builds: common with the constraint
//go:build !tinygo.wasm
and Wasm//go:build tinygo.wasm
. Some methods are defined only for common builds (they will never be called in a Wasm build) and this is handled normally in IDEs like Goland or Zed but in VSCode I get a warning:Additional: I get the following warning for a package with a constraint for a common build:
Steps to reproduce the behavior:
git@github.com:aquasecurity/trivy.git
pkg/sbom/cyclonedx/marshal.go
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
The text was updated successfully, but these errors were encountered: