Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: improve error message when "go get" encounters an unexpected import #4223
Mailing list discussion is here: https://groups.google.com/forum/?fromgroups=#!topic/golang-dev/4oYo21jEGuU At maximum verbosity, `go get` does not give enough information as to what is causing the failure if it encounters an invalid import. Ideally, it would always report the package/file/line number where the invalid import is located. Otherwise it could be buried somewhere deep in a dependency tree. Example: $ go get -d -v -n github.com/go-gl/... import "sdl": import path doesn't contain a slash package sdl: unrecognized import path "sdl" There is something in the code that raises this error talking about the error detail being irrelevant. I don't understand why. http://golang.org/src/cmd/go/vcs.go#L322
Example in the topic is not reproducible. So I made this:
Reported error is somewhat better. It tells the package where problem happened. But it does not tell the file/line.