Skip to content

cmd/go: ".go files ignored due to build tags" inaccurate #18396

Closed
@bradfitz

Description

@bradfitz

Go 1.8 has a new error message and new field https://beta.golang.org/pkg/go/build/#NoGoError.Ignored

The go tool now interprets that NoGoError.Ignored bool as meaning that the ignored files were because of build tags, but that's not necessarily true:

ward5k:~ bradfitz$ cd $GOPATH/src
ward5k:src bradfitz$ mkdir demo
ward5k:src bradfitz$ cd demo/
ward5k:demo bradfitz$ touch .foo.go
ward5k:demo bradfitz$ go fmt .
can't load package: package demo: no buildable Go source files in /Users/bradfitz/src/demo (.go files ignored due to build tags)

Note that the "(.go files ignored due to build tags)" part isn't true.

Should we change the error mesage, or reconsider eee727d for Go 1.8? Are we happy with the new NoGoError.Ignored bool field?

/cc @rakyll @rsc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions