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

- old
+ new

@@ -1,27 +1,37 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: lint.proto -require 'google/protobuf/descriptor_pb' require 'google/protobuf' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("lint.proto", :syntax => :proto3) do - add_message "gitaly.OperationMsg" do - optional :op, :enum, 1, "gitaly.OperationMsg.Operation" - optional :scope_level, :enum, 2, "gitaly.OperationMsg.Scope" +require 'google/protobuf/descriptor_pb' + + +descriptor_data = "\n\nlint.proto\x12\x06gitaly\x1a google/protobuf/descriptor.proto\"\xe5\x01\n\x0cOperationMsg\x12*\n\x02op\x18\x01 \x01(\x0e\x32\x1e.gitaly.OperationMsg.Operation\x12/\n\x0bscope_level\x18\x02 \x01(\x0e\x32\x1a.gitaly.OperationMsg.Scope\"D\n\tOperation\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07MUTATOR\x10\x01\x12\x0c\n\x08\x41\x43\x43\x45SSOR\x10\x02\x12\x0f\n\x0bMAINTENANCE\x10\x03\"2\n\x05Scope\x12\x0e\n\nREPOSITORY\x10\x00\x12\x0b\n\x07STORAGE\x10\x02\"\x04\x08\x01\x10\x01*\x06SERVER:6\n\x0bintercepted\x12\x1f.google.protobuf.ServiceOptions\x18\xfe\x82\x05 \x01(\x08:G\n\x07op_type\x12\x1e.google.protobuf.MethodOptions\x18\xff\x82\x05 \x01(\x0b\x32\x14.gitaly.OperationMsg:<\n\x12intercepted_method\x12\x1e.google.protobuf.MethodOptions\x18\x80\x83\x05 \x01(\x08:0\n\x07storage\x12\x1d.google.protobuf.FieldOptions\x18\xe1\xc8\x05 \x01(\x08:3\n\nrepository\x12\x1d.google.protobuf.FieldOptions\x18\xe2\xc8\x05 \x01(\x08::\n\x11target_repository\x12\x1d.google.protobuf.FieldOptions\x18\xe3\xc8\x05 \x01(\x08:>\n\x15\x61\x64\x64itional_repository\x12\x1d.google.protobuf.FieldOptions\x18\xe4\xc8\x05 \x01(\x08\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_enum "gitaly.OperationMsg.Operation" do - value :UNKNOWN, 0 - value :MUTATOR, 1 - value :ACCESSOR, 2 - value :MAINTENANCE, 3 - end - add_enum "gitaly.OperationMsg.Scope" do - value :REPOSITORY, 0 - value :STORAGE, 2 - 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 OperationMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.OperationMsg").msgclass OperationMsg::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.OperationMsg.Operation").enummodule