-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
x/tools/cmd/stringer: cannot import vendored dependencies #21387
Comments
We're running into this issue as well. It only manifests under Go 1.8, as can be seen here: https://travis-ci.org/stripe/veneur/builds/278659663. It's reproducible locally by changing the Dockerfile in the corresponding pull request to use Go 1.8 instead of Go 1.9. It happens even if the package that it can't find (in this case, The stringer importer uses the default Go importer for 1.8, but not for 1.9. Running I tried to take a stab at fixing this in |
* Workaround for golang/go#21387
This problem was fixed in Go 1.10, but it was reintroduced recently. I'm pretty sure the commit which introduced it was golang/tools@ffe8890, which reverts CL 40403. The commit was reverted in order to solve #25650, though it reintroduces #10249, which is related. I can't comment on that issue because it was originally locked due to age - it was reopened two days ago, but it's still limited to collaborators. |
@ChimeraCoder I unlocked #10249. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.3 linux/amd64
What operating system and processor architecture are you using (
go env
)?Ubuntu Linux, amd64
What did you do?
Attempted to run golang.org/x/tools/cmd/stringer on package importing vendored dependencies
What did you expect to see?
The tool work as expected
What did you see instead?
While 'go build' and all other tools seem fine with depdencies vendored in $GOPATH/src/vendor, stringer fails with import errors:
The text was updated successfully, but these errors were encountered: