Commit Graph

11 Commits

Author SHA1 Message Date
Andrew DeMaria 81abb60d67 generate fully qualified type references
Currently type references for non-local names are output as relative
types which is subject to the resolution rules as defined at
https://protobuf.com/docs/language-spec#reference-resolution
This works fine within the k8s.io namespace where no subpackages are
named k8s, but other users of go-to-protobuf likely have k8s in their
package name. This causes conflicts in the search resolution when
executing `go-to-protobuf`:

```
company.example.com/k8s/custom/pkg/apis/custom.k8s.example.com/v1/generated.proto:64:12: "k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta" is resolved to "company.example.com.k8s.custom.pkg.apis.custom.k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta", which is not defined. The innermost scope is searched first in name resolution. Consider using a leading '.'(i.e., ".k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta") to start from the outermost scope.
```

To avoid this we can output fully qualified type references using a
preceding dot (.)

This results in a change for k8s generated.proto files, but the
effect is a noop.

Fixes kubernetes/code-generator#147

Signed-off-by: Andrew DeMaria <ademaria@cloudflare.com>

Kubernetes-commit: 9edf1fc51c56d565348c48f3765cf094518ba7ed
2023-03-20 18:02:14 -06:00
Tim Hockin 7674c1a859 Fix list_type_missing in k8s.io/apiserver
Kubernetes-commit: eddf65849dfa1b3c351597d7018a2700371d8955
2023-11-17 11:46:28 -08:00
Qiming Teng e014cf25b9 Generated files
Kubernetes-commit: c65fe450d8a3229cfe531a3806939775dd52e7e0
2023-10-03 20:16:10 +08:00
Tim Allclair 237dd3829d generated files
Kubernetes-commit: a67b32ce9c7f1da293a8bb0fc98d3d15f111e660
2020-09-09 12:01:51 -07:00
John Howard bd426ef17c go-to-protobuf: regenerate with full go_package
Kubernetes-commit: 0f93e4da63ea9f98d993758a30d996be672847b7
2021-11-23 09:40:00 -08:00
Abu Kashem 8e027735f7 apiserver: add OmitManagedFields to audit API
Kubernetes-commit: 9ed4bc91d5cc9de236d9f868a0f29263aec4b33e
2021-10-06 14:47:19 -04:00
David Ashpole 4b21935c20 consistently use double quotes in proto files
Kubernetes-commit: 296f7c91bb52cd724ce6d6d120d5d41ed459d677
2020-09-03 13:50:03 -07:00
Nikhita Raghunath a14ca1235c generated proto: remove trailing whitespace
Kubernetes-commit: e60b0a129a16fbc785c73dd4839acaabf856851c
2018-10-25 16:37:33 +05:30
Cao Shufeng a7a4624d67 run make update
Kubernetes-commit: 2c19a5d43c772d9a2f2427591ec3d8d863b7d4fe
2018-08-17 11:35:57 +08:00
Mehdy Bohlool bad7b5ebe9 generated files
Kubernetes-commit: 612dcb9ef1b256deb2431ea5b0a01b351407b6a1
2018-08-08 14:01:51 -07:00
Cao Shufeng d84f9deae6 run "make update"
Kubernetes-commit: 15b800fdf77c70e4560954ba311f761a7a0d2448
2018-07-06 15:23:37 +08:00