Skip to content

Commit

Permalink
Auto-generate files after cl/542949247
Browse files Browse the repository at this point in the history
  • Loading branch information
protobuf-team-bot committed Jun 23, 2023
1 parent 80df4b2 commit 00d8021
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 14 deletions.
66 changes: 52 additions & 14 deletions csharp/src/Google.Protobuf/Compiler/Plugin.pb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,28 @@ static PluginReflection() {
"CiVnb29nbGUvcHJvdG9idWYvY29tcGlsZXIvcGx1Z2luLnByb3RvEhhnb29n",
"bGUucHJvdG9idWYuY29tcGlsZXIaIGdvb2dsZS9wcm90b2J1Zi9kZXNjcmlw",
"dG9yLnByb3RvIkYKB1ZlcnNpb24SDQoFbWFqb3IYASABKAUSDQoFbWlub3IY",
"AiABKAUSDQoFcGF0Y2gYAyABKAUSDgoGc3VmZml4GAQgASgJIroBChRDb2Rl",
"AiABKAUSDQoFcGF0Y2gYAyABKAUSDgoGc3VmZml4GAQgASgJIoECChRDb2Rl",
"R2VuZXJhdG9yUmVxdWVzdBIYChBmaWxlX3RvX2dlbmVyYXRlGAEgAygJEhEK",
"CXBhcmFtZXRlchgCIAEoCRI4Cgpwcm90b19maWxlGA8gAygLMiQuZ29vZ2xl",
"LnByb3RvYnVmLkZpbGVEZXNjcmlwdG9yUHJvdG8SOwoQY29tcGlsZXJfdmVy",
"c2lvbhgDIAEoCzIhLmdvb2dsZS5wcm90b2J1Zi5jb21waWxlci5WZXJzaW9u",
"IsECChVDb2RlR2VuZXJhdG9yUmVzcG9uc2USDQoFZXJyb3IYASABKAkSGgoS",
"c3VwcG9ydGVkX2ZlYXR1cmVzGAIgASgEEkIKBGZpbGUYDyADKAsyNC5nb29n",
"bGUucHJvdG9idWYuY29tcGlsZXIuQ29kZUdlbmVyYXRvclJlc3BvbnNlLkZp",
"bGUafwoERmlsZRIMCgRuYW1lGAEgASgJEhcKD2luc2VydGlvbl9wb2ludBgC",
"IAEoCRIPCgdjb250ZW50GA8gAS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MUGx1Z2luUHJvdG9zWilnb29nbGUu",
"Z29sYW5nLm9yZy9wcm90b2J1Zi90eXBlcy9wbHVnaW5wYqoCGEdvb2dsZS5Q",
"cm90b2J1Zi5Db21waWxlcg=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.Version), global::Google.Protobuf.Compiler.Version.Parser, new[]{ "Major", "Minor", "Patch", "Suffix" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorRequest), global::Google.Protobuf.Compiler.CodeGeneratorRequest.Parser, new[]{ "FileToGenerate", "Parameter", "ProtoFile", "CompilerVersion" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorRequest), global::Google.Protobuf.Compiler.CodeGeneratorRequest.Parser, new[]{ "FileToGenerate", "Parameter", "ProtoFile", "SourceFileDescriptors", "CompilerVersion" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorResponse), global::Google.Protobuf.Compiler.CodeGeneratorResponse.Parser, new[]{ "Error", "SupportedFeatures", "File" }, null, new[]{ typeof(global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.Feature) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.File), global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.File.Parser, new[]{ "Name", "InsertionPoint", "Content", "GeneratedCodeInfo" }, null, null, null, null)})
}));
}
Expand Down Expand Up @@ -462,6 +464,7 @@ public CodeGeneratorRequest(CodeGeneratorRequest other) : this() {
fileToGenerate_ = other.fileToGenerate_.Clone();
parameter_ = other.parameter_;
protoFile_ = other.protoFile_.Clone();
sourceFileDescriptors_ = other.sourceFileDescriptors_.Clone();
compilerVersion_ = other.compilerVersion_ != null ? other.compilerVersion_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
Expand Down Expand Up @@ -527,6 +530,11 @@ public void ClearParameter() {
/// they import. The files will appear in topological order, so each file
/// appears before any file that imports it.
///
/// Note: the files listed in files_to_generate will include runtime-retention
/// options only, but all other files will include source-retention options.
/// The source_file_descriptors field below is available in case you need
/// source-retention options for files_to_generate.
///
/// protoc guarantees that all proto_files will be written after
/// the fields above, even though this is not technically guaranteed by the
/// protobuf wire format. This theoretically could allow a plugin to stream
Expand All @@ -544,6 +552,22 @@ public void ClearParameter() {
get { return protoFile_; }
}

/// <summary>Field number for the "source_file_descriptors" field.</summary>
public const int SourceFileDescriptorsFieldNumber = 17;
private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FileDescriptorProto> _repeated_sourceFileDescriptors_codec
= pb::FieldCodec.ForMessage(138, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.FileDescriptorProto> sourceFileDescriptors_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.FileDescriptorProto>();
/// <summary>
/// File descriptors with all options, including source-retention options.
/// These descriptors are only provided for the files listed in
/// files_to_generate.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<global::Google.Protobuf.Reflection.FileDescriptorProto> SourceFileDescriptors {
get { return sourceFileDescriptors_; }
}

/// <summary>Field number for the "compiler_version" field.</summary>
public const int CompilerVersionFieldNumber = 3;
private global::Google.Protobuf.Compiler.Version compilerVersion_;
Expand Down Expand Up @@ -577,6 +601,7 @@ public bool Equals(CodeGeneratorRequest other) {
if(!fileToGenerate_.Equals(other.fileToGenerate_)) return false;
if (Parameter != other.Parameter) return false;
if(!protoFile_.Equals(other.protoFile_)) return false;
if(!sourceFileDescriptors_.Equals(other.sourceFileDescriptors_)) return false;
if (!object.Equals(CompilerVersion, other.CompilerVersion)) return false;
return Equals(_unknownFields, other._unknownFields);
}
Expand All @@ -588,6 +613,7 @@ public override int GetHashCode() {
hash ^= fileToGenerate_.GetHashCode();
if (HasParameter) hash ^= Parameter.GetHashCode();
hash ^= protoFile_.GetHashCode();
hash ^= sourceFileDescriptors_.GetHashCode();
if (compilerVersion_ != null) hash ^= CompilerVersion.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
Expand Down Expand Up @@ -617,6 +643,7 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteMessage(CompilerVersion);
}
protoFile_.WriteTo(output, _repeated_protoFile_codec);
sourceFileDescriptors_.WriteTo(output, _repeated_sourceFileDescriptors_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
Expand All @@ -637,6 +664,7 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteMessage(CompilerVersion);
}
protoFile_.WriteTo(ref output, _repeated_protoFile_codec);
sourceFileDescriptors_.WriteTo(ref output, _repeated_sourceFileDescriptors_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
Expand All @@ -652,6 +680,7 @@ public int CalculateSize() {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Parameter);
}
size += protoFile_.CalculateSize(_repeated_protoFile_codec);
size += sourceFileDescriptors_.CalculateSize(_repeated_sourceFileDescriptors_codec);
if (compilerVersion_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(CompilerVersion);
}
Expand All @@ -672,6 +701,7 @@ public void MergeFrom(CodeGeneratorRequest other) {
Parameter = other.Parameter;
}
protoFile_.Add(other.protoFile_);
sourceFileDescriptors_.Add(other.sourceFileDescriptors_);
if (other.compilerVersion_ != null) {
if (compilerVersion_ == null) {
CompilerVersion = new global::Google.Protobuf.Compiler.Version();
Expand Down Expand Up @@ -712,6 +742,10 @@ public void MergeFrom(pb::CodedInputStream input) {
protoFile_.AddEntriesFrom(input, _repeated_protoFile_codec);
break;
}
case 138: {
sourceFileDescriptors_.AddEntriesFrom(input, _repeated_sourceFileDescriptors_codec);
break;
}
}
}
#endif
Expand Down Expand Up @@ -746,6 +780,10 @@ public void MergeFrom(pb::CodedInputStream input) {
protoFile_.AddEntriesFrom(ref input, _repeated_protoFile_codec);
break;
}
case 138: {
sourceFileDescriptors_.AddEntriesFrom(ref input, _repeated_sourceFileDescriptors_codec);
break;
}
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/file_lists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,11 @@ set(protobuf_lite_test_protos_files
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lite.proto
)

# @//src/google/protobuf/compiler:fake_plugin_srcs
set(fake_plugin_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/fake_plugin.cc
)

# @//src/google/protobuf/compiler:test_srcs
set(compiler_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/command_line_interface_unittest.cc
Expand Down

0 comments on commit 00d8021

Please sign in to comment.