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/compile: error message with vendor folder not clear #16053

Closed
sergeylanzman opened this issue Jun 13, 2016 · 2 comments
Closed

cmd/compile: error message with vendor folder not clear #16053

sergeylanzman opened this issue Jun 13, 2016 · 2 comments

Comments

@sergeylanzman
Copy link

sergeylanzman commented Jun 13, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    1.6.2 and 1.7beta1
  2. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/XXXXX/Documents/XXXXX"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
  1. What did you do?
package main
func main(){
n := negroni.New()

n = A.AddMiddlewares(n)
...
}
package A
func AddMiddlewares(n *negroni.Negroni) *negroni.Negroni {
    n.UseFunc(setContext())
    n.UseFunc(newRelicRecorder())
    n.UseFunc(cors())
    n.UseFunc(recovery())
    return n
}
  1. What did you expect to see?
    go 1.6.2
cannot use n (type *"github.com/ZZZ/XXXX/vendor/github.com/codegangsta/negroni".Negroni) as type *"github.com/codegangsta/negroni".Negroni in argument to A.AddMiddlewares
  1. What did you see instead?
    go 1.7beta
cannot use n (type *negroni.Negroni) as type *negroni.Negroni in argument to A.AddMiddlewares
@ianlancetaylor ianlancetaylor changed the title Error message with vendor folder not clear cmd/go: error message with vendor folder not clear Jun 13, 2016
@ianlancetaylor ianlancetaylor added this to the Go1.7Maybe milestone Jun 13, 2016
@adg adg changed the title cmd/go: error message with vendor folder not clear cmd/compile: error message with vendor folder not clear Jun 14, 2016
@adg
Copy link
Contributor

adg commented Jun 14, 2016

The compiler is aware that these are distinct packages. The error message should include some disambiguation when the package names are equivalent.

@ianlancetaylor
Copy link
Contributor

I'm pretty sure this was reported again as #16133, which is fixed on tip. I'm going to close this. If this is still happening on tip, please provide clear instructions for how to reproduce it.

@golang golang locked and limited conversation to collaborators Jul 6, 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