diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2020-08-27 08:22:37 +0000 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-08-28 05:45:35 -0400 |
commit | 90a86cad3a6f007c6708406d8a78528fbb302a0a (patch) | |
tree | 4c6546079346d0ff39f7c9a4d076913457a6a417 /vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go | |
parent | d6b13d8a0993aced5e227e7a516aadbf37e14dbc (diff) | |
download | podman-90a86cad3a6f007c6708406d8a78528fbb302a0a.tar.gz podman-90a86cad3a6f007c6708406d8a78528fbb302a0a.tar.bz2 podman-90a86cad3a6f007c6708406d8a78528fbb302a0a.zip |
Bump k8s.io/apimachinery from 0.18.8 to 0.19.0
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.18.8 to 0.19.0.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.18.8...v0.19.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go')
-rw-r--r-- | vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go index 43f16c616..5e5f96716 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +++ b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go @@ -96,6 +96,38 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { } path := file.Path() if prev := r.filesByPath[path]; prev != nil { + // TODO: Remove this after some soak-in period after moving these types. + var prevPath string + const prevModule = "google.golang.org/genproto" + const prevVersion = "cb27e3aa (May 26th, 2020)" + switch path { + case "google/protobuf/field_mask.proto": + prevPath = prevModule + "/protobuf/field_mask" + case "google/protobuf/api.proto": + prevPath = prevModule + "/protobuf/api" + case "google/protobuf/type.proto": + prevPath = prevModule + "/protobuf/ptype" + case "google/protobuf/source_context.proto": + prevPath = prevModule + "/protobuf/source_context" + } + if r == GlobalFiles && prevPath != "" { + pkgName := strings.TrimSuffix(strings.TrimPrefix(path, "google/protobuf/"), ".proto") + pkgName = strings.Replace(pkgName, "_", "", -1) + "pb" + currPath := "google.golang.org/protobuf/types/known/" + pkgName + panic(fmt.Sprintf(""+ + "duplicate registration of %q\n"+ + "\n"+ + "The generated definition for this file has moved:\n"+ + "\tfrom: %q\n"+ + "\tto: %q\n"+ + "A dependency on the %q module must\n"+ + "be at version %v or higher.\n"+ + "\n"+ + "Upgrade the dependency by running:\n"+ + "\tgo get -u %v\n", + path, prevPath, currPath, prevModule, prevVersion, prevPath)) + } + err := errors.New("file %q is already registered", file.Path()) err = amendErrorWithCaller(err, prev, file) if r == GlobalFiles && ignoreConflict(file, err) { |