-
Notifications
You must be signed in to change notification settings - Fork 1k
Migrating a library Godeps.json with transitive deps #1124
Description
In the process of adding dep support to k8s.io/client-go and friends I hit the following problem:
k8s.io/client-go depends on many packages that do not support golang/dep (= do not ship a Gopkg.toml). Some of them are not direct dependencies of k8s.io/client-go itself, i.e. client-go's Gopkg.toml cannot use constraints. At the same time, client-go is not the root package, but users depend on it using golang/dep. Hence, client-go's overrides have no effect either.
In addition, client-go's dependencies are complex enough that we want to avoid putting the burden on the users to declare dependencies themselves.
- How can we provide those dependencies to the users while the packages we depend on do not support
golang/dep? - Even if all dependencies support
golang/depsome day, I claim that there will be situations when we cannot trust them or just have to override them for technical reasons. Imagine client-go depends onfoov1 andfoodepends onbarv2. Nowbarv2.1.2 is released, but – while source code compatible – brakes a feature offoo. In client-go we would have no way to restrict to<v2.1.2.
While (1) suggests that we might want to follow overrides in dependencies until the direct dependencies ship Gopkg.toml, (2) suggests that the problem won't go away in the future with full golang/dep support throughout all packages.