ruby/proto/gitaly/namespace_pb.rb in gitaly-15.11.0.pre.rc1 vs ruby/proto/gitaly/namespace_pb.rb in gitaly-16.1.0.pre.rc1

- old
+ new

@@ -1,39 +1,37 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: namespace.proto -require 'lint_pb' require 'google/protobuf' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("namespace.proto", :syntax => :proto3) do - add_message "gitaly.AddNamespaceRequest" do - optional :storage_name, :string, 1 - optional :name, :string, 2 +require 'lint_pb' + + +descriptor_data = "\n\x0fnamespace.proto\x12\x06gitaly\x1a\nlint.proto\"?\n\x13\x41\x64\x64NamespaceRequest\x12\x1a\n\x0cstorage_name\x18\x01 \x01(\tB\x04\x88\xc6,\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\"B\n\x16RemoveNamespaceRequest\x12\x1a\n\x0cstorage_name\x18\x01 \x01(\tB\x04\x88\xc6,\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\"N\n\x16RenameNamespaceRequest\x12\x1a\n\x0cstorage_name\x18\x01 \x01(\tB\x04\x88\xc6,\x01\x12\x0c\n\x04\x66rom\x18\x02 \x01(\t\x12\n\n\x02to\x18\x03 \x01(\t\"B\n\x16NamespaceExistsRequest\x12\x1a\n\x0cstorage_name\x18\x01 \x01(\tB\x04\x88\xc6,\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\")\n\x17NamespaceExistsResponse\x12\x0e\n\x06\x65xists\x18\x01 \x01(\x08\"\x16\n\x14\x41\x64\x64NamespaceResponse\"\x19\n\x17RemoveNamespaceResponse\"\x19\n\x17RenameNamespaceResponse2\x81\x03\n\x10NamespaceService\x12S\n\x0c\x41\x64\x64Namespace\x12\x1b.gitaly.AddNamespaceRequest\x1a\x1c.gitaly.AddNamespaceResponse\"\x08\xfa\x97(\x04\x08\x01\x10\x02\x12\\\n\x0fRemoveNamespace\x12\x1e.gitaly.RemoveNamespaceRequest\x1a\x1f.gitaly.RemoveNamespaceResponse\"\x08\xfa\x97(\x04\x08\x01\x10\x02\x12\\\n\x0fRenameNamespace\x12\x1e.gitaly.RenameNamespaceRequest\x1a\x1f.gitaly.RenameNamespaceResponse\"\x08\xfa\x97(\x04\x08\x01\x10\x02\x12\\\n\x0fNamespaceExists\x12\x1e.gitaly.NamespaceExistsRequest\x1a\x1f.gitaly.NamespaceExistsResponse\"\x08\xfa\x97(\x04\x08\x02\x10\x02\x42\x34Z2gitlab.com/gitlab-org/gitaly/v16/proto/go/gitalypbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end - add_message "gitaly.RemoveNamespaceRequest" do - optional :storage_name, :string, 1 - optional :name, :string, 2 - end - add_message "gitaly.RenameNamespaceRequest" do - optional :storage_name, :string, 1 - optional :from, :string, 2 - optional :to, :string, 3 - end - add_message "gitaly.NamespaceExistsRequest" do - optional :storage_name, :string, 1 - optional :name, :string, 2 - end - add_message "gitaly.NamespaceExistsResponse" do - optional :exists, :bool, 1 - end - add_message "gitaly.AddNamespaceResponse" do - end - add_message "gitaly.RemoveNamespaceResponse" do - end - add_message "gitaly.RenameNamespaceResponse" do - end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Gitaly AddNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.AddNamespaceRequest").msgclass RemoveNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.RemoveNamespaceRequest").msgclass