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/imports: don't prepend std/ to packages from GOROOT #31814

Closed
bradfitz opened this issue May 2, 2019 · 3 comments

Comments

@bradfitz
Copy link
Member

commented May 2, 2019

In #31769 goimports added "std/go/token" for me. (Because I used a new API only in master and not yet recognized by the goimports fast path)

And in https://go-review.googlesource.com/c/go/+/175099/ I got a failure:

https://storage.googleapis.com/go-build-log/0c3a1672/freebsd-amd64-12_0_de6f6ad5.log

ok  	context	1.249s
ok  	crypto	0.006s
ok  	crypto/aes	0.020s
# crypto/cipher
package crypto/cipher_test
	imports std/internal/testenv: unknown import path "std/internal/testenv": cannot find module providing package std/internal/testenv
FAIL	crypto/cipher [setup failed]
ok  	crypto/des	0.007s
ok  	crypto/dsa	0.004s
2019/05/02 22:10:18 Failed: exit status 1

because goimports added "std/internal/testenv".

We need to remove the std/ prefixes.

@bradfitz bradfitz added the NeedsFix label May 2, 2019

@gopherbot gopherbot added this to the Unreleased milestone May 2, 2019

@gopherbot

This comment has been minimized.

Copy link

commented May 2, 2019

Change https://golang.org/cl/175101 mentions this issue: imports: remove std/ prefix from added GOROOT imports

@mvdan

This comment has been minimized.

Copy link
Member

commented May 3, 2019

I had the same happen to me while I was working on the go/token CL itself, but I figured I was using goimports wrong :)

@gopherbot

This comment has been minimized.

Copy link

commented Sep 12, 2019

Change https://golang.org/cl/195063 mentions this issue: internal/imports: don't prefix stdlib package with std/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.