Building one of our projects with Go 1.11 works fine but I noticed that some packages from the stdlib get rebuilt during the build:
$ go version go version go1.11 darwin/amd64 $ pwd /tmp/modules/ch.redacted.redacted/internal/db $ cat ../../go.mod module git.intern.redacted.net/redacted/ch.redacted.redacted require ( git.intern.redacted.net/shared/net.redacted.go-common v1.0.0 github.com/DataDog/mmh3 v0.0.0-20160824182314-2cfb68475274 // indirect github.com/Shopify/sarama v1.17.0 [... truncated ...] gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.2.1 // indirect ) $ go build -v Fetching https://gopkg.in/fsnotify.v1?go-get=1 Fetching https://git.intern.redacted.net/shared/net.redacted.go-common?go-get=1 go: finding github.com/DataDog/mmh3 v0.0.0-20160824182314-2cfb68475274 go: finding github.com/hpcloud/tail v1.0.0 go: finding github.com/golang/protobuf v1.2.0 go: finding github.com/mtchavez/cuckoo v0.1.0 Parsing meta tags from https://git.intern.redacted.net/shared/net.redacted.go-common?go-get=1 (status code 200) get "git.intern.redacted.net/shared/net.redacted.go-common": found meta tag get.metaImport{Prefix:"git.intern.redacted.net/shared/net.redacted.go-common", VCS:"git", RepoRoot:"https://git.intern.redacted.net/shared/net.redacted.go-common.git"} at https://git.intern.redacted.net/shared/net.redacted.go-common?go-get=1 go: finding git.intern.redacted.net/shared/net.redacted.go-common v1.0.0 go: finding github.com/fsnotify/fsnotify v1.4.7 [ ... truncated ... ] go: finding golang.org/x/net v0.0.0-20180826012351-8a410e7b638d Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200) get "golang.org/x/sys": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys?go-get=1 go: finding golang.org/x/sys v0.0.0-20171216171702-571f7bbbe08d go: downloading github.com/go-sql-driver/mysql v1.4.0 go: downloading github.com/newrelic/go-agent v2.0.0+incompatible [ ... truncated ... ] go: downloading github.com/pierrec/lz4 v0.0.0-20171218195038-2fcda4cb7018 go: downloading github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db go: downloading github.com/pierrec/xxHash v0.1.1 golang_org/x/crypto/cryptobyte/asn1 golang_org/x/net/dns/dnsmessage golang_org/x/crypto/curve25519 [ ... truncated ... ] golang_org/x/text/secure/bidirule golang_org/x/text/unicode/norm *net* golang_org/x/net/idna golang_org/x/net/http/httpproxy *log/syslog* *net/textproto* *crypto/x509* github.com/inconshreveable/log15 github.com/rcrowley/go-metrics golang_org/x/net/http/httpguts *crypto/tls* *net/http/httptrace* github.com/go-sql-driver/mysql github.com/Shopify/sarama *net/http* github.com/newrelic/go-agent/internal/utilization github.com/newrelic/go-agent/internal github.com/newrelic/go-agent git.intern.redacted.net/shared/net.redacted.go-common/logging git.intern.redacted.net/redacted/ch.redacted.redacted/internal/charge git.intern.redacted.net/redacted/ch.redacted.redacted/internal/db Everything looks normal (that's why I truncated above output). Except a handful of stdlib packages which get rebuilt (highlighted in purple). These stdlib packages are not imported directly by the package being built (here package db). Why are these stdlib packages being rebuilt? V. P.S. No fancy setting: $ go env GOARCH="amd64" GOBIN="" GOCACHE="/Users/myself/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/myself/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="/tmp/modules/ch.redacted.redacted/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/f6/vr81k40j5y35bpj039w1hwfdrvg106/T/go-build500463001=/tmp/go-build -gno-record-gcc-switches -fno-common" -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.