0

I have a Go repository with a go.mod currently requiring k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible.

I would like to bump the version of k8s.io/client-go used by my module but, when I change the version to be v0.19.1 (which exists) and then run go mod tidy, the version is set again to k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible with no explanation.

How to know why a specific package needs to be a specific version? I would like to know which of my requirement needs k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible.

Armand Grillet
  • 3,229
  • 5
  • 30
  • 60
  • Another dependency most likely requires that specific older version. Inspect your other dependencies & their corresponding `go.mod` contents. – colm.anseo Sep 11 '20 at 16:47
  • This is not scalable when there are a high number of dependencies, I would expect a go command to give me this information instead of having to do it manually. – Armand Grillet Sep 12 '20 at 09:13
  • I had the same issue bumping from a "no-mod" to a "mod aware" package version. In my case, the major version was 5. The solution was to add /v5 to import, i.e., changing import `"github.com/foo/yyy"` to `import "github.com/foo/yyy/v5"` – Rodrigo Aug 01 '23 at 16:47

1 Answers1

1

go mod graph | grep v11.0.1-0.20190409021438-1a26190bd76a should give you a starting point. You can work backwards from there.

bcmills
  • 4,391
  • 24
  • 34