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

x/tools/cmd/fiximports: tests failing at tip #17417

Open
bradfitz opened this issue Oct 12, 2016 · 3 comments
Open

x/tools/cmd/fiximports: tests failing at tip #17417

bradfitz opened this issue Oct 12, 2016 · 3 comments
Assignees
Labels
Testing Tools
Milestone

Comments

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Oct 12, 2016

At tip, the tests for golang.org/x/tools/cmd/fiximports are failing.

It's not immediately obvious to me why. I'd never seen this tool before.

@alandonovan, can you take a look?

@bradfitz bradfitz added the Testing label Oct 12, 2016
@bradfitz bradfitz added this to the Unreleased milestone Oct 12, 2016
@gopherbot
Copy link

@gopherbot gopherbot commented Oct 12, 2016

CL https://golang.org/cl/30953 mentions this issue.

gopherbot pushed a commit to golang/tools that referenced this issue Oct 12, 2016
Fix godoc test failure.

Skip fiximports test failure for now, to not hide other
failures. (tracking bug to fix properly in golang/go#17417)

x/tools being broken is preventing use of trybots for unrelated CLs.

Change-Id: I3a1deee4036096e0377cf8b63fabe444c58dd86e
Reviewed-on: https://go-review.googlesource.com/30953
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
@alandonovan
Copy link
Contributor

@alandonovan alandonovan commented Oct 12, 2016

The following packages beneath $GOROOT have a non-empty ImportComment that differs from their ImportPath:

ImportPath                              ImportComment
vendor/golang_org/x/net/idna            golang.org/x/net/idna
vendor/golang_org/x/text/transform      golang.org/x/text/transform
vendor/golang_org/x/text/unicode/norm   golang.org/x/text/unicode/norm
vendor/golang_org/x/text/width          golang_org/x/text/width
golang.org/x/arch/vendor/rsc.io/pdf     rsc.io/pdf

I'm not sure what the correct behavior of fiximports should be in the presence of vendored packages. Inspecting only the suffix of the ImportPath after vendor/ is not sufficient due to the dot-to-slash renaming that has apparently happened. Perhaps the tool should just ignore any packages whose ImportPath contains vendor?

@rsc Does anyone actually use this tool?

@agnivade
Copy link
Contributor

@agnivade agnivade commented Nov 7, 2018

@alandonovan - If nobody uses this tool, then I think ignoring vendor paths may be the easiest solution.

ping @rsc for further comments.

@gopherbot gopherbot added the Tools label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Tools
Projects
None yet
Development

No branches or pull requests

4 participants