x/tools/cmd/stringer: error message is less clear than that of go build when there's a build error due to multiple package names in same directory #46207
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Hi!
I was changing my project's structure. In my
enums
directory I have files with//go:generate stringer
directives. At some point, I forgot to change package name in a file copied from somewhere else. I've tried to rungo generate
and and got stuck:Example
there are two files in package, but with another
package
namesthe
go build .
returns:found packages package1 (file1.go) and package2 (file2.go) in /home/user/test/
but
go generate
returns something strange:file1.go
file2.go
What did you expect to see?
go generate
should report understandable message when build errors foundWhat did you see instead?
The text was updated successfully, but these errors were encountered: