Open bradfitz opened 8 years ago
CL https://golang.org/cl/30953 mentions this issue.
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?
@alandonovan - If nobody uses this tool, then I think ignoring vendor
paths may be the easiest solution.
ping @rsc for further comments.
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?