You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
I am using weekly.2012-01-20 on Mac OS X 10.6.8 (darwin-386) and I've
noticed a problem with the error reporting for the go tool.
When I have an error in the import statements the message provided is
far less useful to determining the problem:
$ cat foo.go
package foo
import (
"bar" // There is no package bar
"testing"
)
func TestFoo(t *testing.T) {
}
$ 8g foo.go
foo.go:4: can't find import: "bar"
$ go build
.: import bar
package could not be found locally
.: import bar
package could not be found locally
The error message provided by the go tool omits the file name and line
number making it much more difficult to find the problem in a large
package.
The problem is even worse for go test, by renaming the above file to
foo_test.go and having a valid foo.go:
$ mv foo.go foo_test.go
$ echo package foo > foo.go
$ go test
package could not be found locally
The error message is even worse since it doesn't even tell me which
package couldn't be found.
Carlos Castillo
unread,
Jan 21, 2012, 4:42:16 PM1/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message