Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bradfitz opened this issue Dec 21, 2016 · 3 comments
Closed

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

bradfitz opened this issue Dec 21, 2016 · 3 comments
Milestone

Comments

@bradfitz
Copy link
Contributor

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

@bradfitz bradfitz added this to the Go1.8Maybe milestone Dec 21, 2016
@rsc
Copy link
Contributor

rsc commented Dec 21, 2016

At this point I think we should just revert the CL instead of trying to fix it up. The old message was about as precise as it is possible to be: there are no buildable Go source files in the directory. There may be unbuildable Go source files or not. The new message, by trying to be more precise, turns out to be incorrect.

I thought this wording change was not worth the effort when it went by, but I didn't see it until it was already in, so I didn't say anything then. It definitely doesn't seem worth the effort to fix now, and since it's demonstrably incorrect, let's just revert it.

@rsc rsc modified the milestones: Go1.8, Go1.8Maybe Dec 21, 2016
@bradfitz bradfitz changed the title cmd/go: cmd/go: ".go files ignored due to build tags" inaccurate Dec 21, 2016
@gopherbot
Copy link

CL https://golang.org/cl/34662 mentions this issue.

@rakyll
Copy link
Contributor

rakyll commented Dec 21, 2016

Reverting sounds the best. Let's try to properly detect the case in 1.9.

@golang golang locked and limited conversation to collaborators Dec 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants