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/go: replace directive causes build to take 30 seconds #29920

Closed
levblanc opened this issue Jan 24, 2019 · 1 comment

Comments

Projects
None yet
4 participants
@levblanc
Copy link

commented Jan 24, 2019

What version of Go are you using (go version)?

$ go version
go version go1.11.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN="/Users/levblanc/go/bin"
GOCACHE="/Users/levblanc/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/levblanc/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/levblanc/projects/x-crypto-issue/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/yk/p1tyzt2n5m38k09cbsgktxhh0000gn/T/go-build141072027=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  • imported golang.org/x/crypto/bcrypt in my program

  • alias golang.org/x/crypto@v0.0.0 to github.com/golang/crypto@latest with go mod

Here is the repo to reproduce the problem.

You can find detailed description and my thoughts in the README file.

What did you expect to see?

go run main.go works as normal.

What did you see instead?

go run main.go takes around 30 seconds to print out the result of my simple program,

while go run -mod=vendor main.go works well.

@gopherbot gopherbot added this to the Unreleased milestone Jan 24, 2019

@FiloSottile FiloSottile changed the title x/crypto/bcrypt: question on sub-dependency blowfish cmd/go: replace directive causes build to take 30 seconds Jan 24, 2019

@FiloSottile FiloSottile modified the milestones: Unreleased, Go1.13 Jan 24, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

Duplicate of #27859.

@bcmills bcmills closed this Jan 24, 2019

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