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: report file:line of incorrect import #2664
Labels
Milestone
Comments
This is trivial to fix but probably related to rsc's pending work on "go fetch", so I'll leave it for him. Labels changed: added priority-go1, removed priority-triage. Owner changed to @rsc. Status changed to Accepted. |
Owner changed to builder@golang.org. |
A similar, but slightly different thing happens with the go build command. It prints the package name that can't be found, but not the file/line number. I posted my findings to the golang-nuts list: http://groups.google.com/group/golang-nuts/browse_frm/thread/4b4cfca66001486c/a857297eb742ec15?#a857297eb742ec15 |
nice report ---------- Forwarded message ---------- From: Carlos Castillo <cookieo9@gmail.com> Date: Fri, Jan 20, 2012 at 11:37 Subject: [go-nuts] Go Tool Incomplete Error Messages To: golang-nuts <golang-nuts@googlegroups.com> 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. Owner changed to @rsc. |
This issue was closed by revision e818536. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by jacobsa@google.com:
Attachments:
The text was updated successfully, but these errors were encountered: