cmd/go: suggestion to fail to build, or emit warning, on unused build tags #47020
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?What did you expect to see?
I added a build tag (specifically
go build -tags lambda.norpc
), which is a build tag honored by https://github.com/aws/aws-lambda-goHowever, it just so happened that the build tag was introduced in a version later than the version I had pinned. My go mod had v1.13, the build tag was introduced in v1.18
This was incredibly difficult to discover, therefor I am suggesting that passing a build tag should produce an error if that build tag is not found anywhere. At least a warning should be displayed, if not failing the build entirely.
The text was updated successfully, but these errors were encountered: