Closed as not planned
Description
What version of Go are you using (go version
)?
go version go1.11.4 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/d/14-Workspace/go/github.com/F21/somerepo/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build348706889=/tmp/go-build -gno-record-gcc-switches"
What did you do?
- Create go.mod:
go mod init github.com/F21/somerepo
. - Populate
go.mod
andgo.sum
by runninggo test ./...
. - One of the dependencies
github.com/uber/jaeger-client-go
conflicts with another dependency, so I bumped it to master:go get github.com/uber/jaeger-client-go@master
. - There are now 2 entries for
github.com/uber/jaeger-client-go
in my go.sum:
github.com/uber/jaeger-client-go v2.15.0+incompatible h1:NP3qsSqNxh8VYr956ur1N/1C1PjvOJnJykCzcD5QHbk=
github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-client-go v2.15.1-0.20190116124224-6733ee486c78+incompatible h1:b2A4zBpOpzqZoSlqlJ3OOe0yjd577TnQIHG1/KN7U8E=
github.com/uber/jaeger-client-go v2.15.1-0.20190116124224-6733ee486c78+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
The github.com/uber/jaeger-client-go v2.15.0+incompatible
entries are unnecessary as the project is now pinned to github.com/uber/jaeger-client-go v2.15.1-0.20190116124224-6733ee486c78+incompatible (current master)
.
In #26381, the ability to trim go.sum
was added to go mod tidy
. However, go mod tidy
is something I avoid as it pulls in all test dependencies for all my dependencies and their dependencies for all platforms. Unfortunately, go mod tidy
has burnt me quite a few times and causes a lot more problems than it solves.
See:
- https://groups.google.com/forum/#!topic/golang-nuts/5otdvVra0xg
- cmd/go: mod tidy pulls in too many dependencies #27920
What did you expect to see?
I'd like to be able to trim unneeded entries from go.sum without having to run go mod tidy
as its current behavior causes a lot more problems than it solves.
What did you see instead?
N/A.