5 ms·
Suppose you're the maintainer of a popular open source project, and you have a million users running a working, stable version using code generation. What prio
by jppittma 4y ago
Suppose you're the maintainer of a popular open source project, and you have a million users running a working, stable version using code generation.
What priority would you assign a bug that migrates the existing, working code that other people are doing god knows what with downstream? What would the theoretical benefits "better code" be to your downstream, and how do they weigh against the cost of "I ran go mod tidy, and our build broke?"
I can think of a use where it would lead to better code, and that's in k8s custom resources, where each resource type also has an associated list type that people create with code generation. It'd be much neater for k8s lists to be
type List[T runtime.Object] struct {
...
Items []T
}
Than the way it is now: https://www.google.com/search?q=site%3Agithub.com+zz_generated.deepcopy.go https://www.google.com/search?q=site%3Agithub.com+zz_generat...