From 292d10eb1bf5eab0438edfba3fadb6d79247b01c Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Thu, 18 Apr 2024 06:26:14 -0700 Subject: [PATCH] C#: Remove TODO, replacing it with an explanation. PiperOrigin-RevId: 626013380 --- csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs index f46667ed070ba..9d41930838a57 100644 --- a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs @@ -379,7 +379,12 @@ internal void CrossLink() IDescriptor typeDescriptor = File.DescriptorPool.LookupSymbol(Proto.TypeName, this); - // TODO: See how much of this is actually required. + // In most cases, the type will be specified in the descriptor proto. This may be + // guaranteed in descriptor.proto in the future (with respect to spring 2024), but + // we may still see older descriptors created by old versions of protoc, and there + // may be some code creating descriptor protos directly. This code effectively + // maintains backward compatibility, but we don't expect it to be a path taken + // often at all. if (!Proto.HasType) { // Choose field type based on symbol.