Skip to content

cmd/go: using golang.org/x/* from mainland China is awkward with modules #28652

Closed
@hellojukay

Description

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

[jukay@mac-pro]~/log$ go version
go version go1.11 darwin/amd64
[jukay@mac-pro]~/log$

Does this issue reproduce with the latest release?

yes

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

go env Output
[jukay@mac-pro]~/log$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/jukay/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/jukay/Code/Go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/jukay/log/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/yp/_44_30ts2_xf43zpz2j72k200000gn/T/go-build712144984=/tmp/go-build -gno-record-gcc-switches -fno-common"
[jukay@mac-pro]~/log$

What did you do?

just compile this project outside GOPATH

[jukay@mac-pro]~/log$ go build

What did you expect to see?

[jukay@mac-pro]~/log$ time go build

real	0m0.316s
user	0m0.195s
sys	0m0.232s

What did you see instead?

[jukay@mac-pro]~/log$ time go build

real	1m0.316s
user	0m0.195s
sys	0m0.232s

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions