Changing reflection namespace (part 3)

Change the C# namespace in descriptor.proto to Google.Protobuf.Reflection.
This then means changing where the generated code lives, which means updating the project file...

It also involves regenerating the C++ - which has updated the well-known types as well,
for no terribly obvious reason...
This commit is contained in:
Jon Skeet 2015-07-14 11:13:52 +01:00
parent 76940942cf
commit 9c888fa3a2
12 changed files with 251 additions and 252 deletions

View File

@ -38,7 +38,7 @@ fi
# Descriptor proto
# TODO(jonskeet): Remove fixup
cp src/google/protobuf/descriptor.proto src/google/protobuf/descriptor_proto_file.proto
$PROTOC -Isrc --csharp_out=csharp/src/ProtocolBuffers/DescriptorProtos \
$PROTOC -Isrc --csharp_out=csharp/src/ProtocolBuffers/Reflection \
src/google/protobuf/descriptor_proto_file.proto
rm src/google/protobuf/descriptor_proto_file.proto

View File

@ -60,8 +60,6 @@
<Compile Include="Collections\MapField.cs" />
<Compile Include="Collections\ReadOnlyDictionary.cs" />
<Compile Include="Collections\RepeatedField.cs" />
<Compile Include="DescriptorProtos\DescriptorProtoFile.cs" />
<Compile Include="DescriptorProtos\PartialClasses.cs" />
<Compile Include="FieldCodec.cs" />
<Compile Include="FrameworkPortability.cs" />
<Compile Include="Freezable.cs" />
@ -74,6 +72,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Reflection\DescriptorBase.cs" />
<Compile Include="Reflection\DescriptorPool.cs" />
<Compile Include="Reflection\DescriptorProtoFile.cs" />
<Compile Include="Reflection\DescriptorUtil.cs" />
<Compile Include="Reflection\DescriptorValidationException.cs" />
<Compile Include="Reflection\EnumDescriptor.cs" />
@ -91,6 +90,7 @@
<Compile Include="Reflection\OneofAccessor.cs" />
<Compile Include="Reflection\OneofDescriptor.cs" />
<Compile Include="Reflection\PackageDescriptor.cs" />
<Compile Include="Reflection\PartialClasses.cs" />
<Compile Include="Reflection\ReflectionUtil.cs" />
<Compile Include="Reflection\RepeatedFieldAccessor.cs" />
<Compile Include="Reflection\ServiceDescriptor.cs" />

View File

@ -31,7 +31,7 @@
#endregion
// This file just contains partial classes for any autogenerated classes that need additional support.
namespace Google.Protobuf.DescriptorProtos
namespace Google.Protobuf.Reflection
{
internal partial class FieldDescriptorProto
{

View File

@ -82,9 +82,8 @@ void protobuf_AddDesc_google_2fprotobuf_2fany_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\031google/protobuf/any.proto\022\017google.prot"
"obuf\"&\n\003Any\022\020\n\010type_url\030\001 \001(\t\022\r\n\005value\030\002"
" \001(\014BC\n\023com.google.protobufB\010AnyProtoP\001\240"
"\001\001\242\002\003GPB\252\002\026Google.ProtocolBuffersb\006proto"
"3", 161);
" \001(\014B<\n\023com.google.protobufB\010AnyProtoP\001\240"
"\001\001\242\002\003GPB\252\002\017Google.Protobufb\006proto3", 154);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/any.proto", &protobuf_RegisterTypes);
Any::default_instance_ = new Any();

View File

@ -753,9 +753,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
"ion\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004sp"
"an\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022\031"
"\n\021trailing_comments\030\004 \001(\t\022!\n\031leading_det"
"ached_comments\030\006 \003(\tB^\n\023com.google.proto"
"ached_comments\030\006 \003(\tBX\n\023com.google.proto"
"bufB\020DescriptorProtosH\001Z\ndescriptor\242\002\003GP"
"B\252\002 Google.Protobuf.DescriptorProtos", 4956);
"B\252\002\032Google.Protobuf.Reflection", 4950);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/descriptor.proto", &protobuf_RegisterTypes);
FileDescriptorSet::default_instance_ = new FileDescriptorSet();

View File

@ -43,7 +43,7 @@ package google.protobuf;
option go_package = "descriptor";
option java_package = "com.google.protobuf";
option java_outer_classname = "DescriptorProtos";
option csharp_namespace = "Google.Protobuf.DescriptorProtos";
option csharp_namespace = "Google.Protobuf.Reflection";
option objc_class_prefix = "GPB";
// descriptor.proto must be optimized for speed because reflection-based

View File

@ -82,9 +82,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\036google/protobuf/duration.proto\022\017google"
".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r"
"\n\005nanos\030\002 \001(\005BH\n\023com.google.protobufB\rDu"
"rationProtoP\001\240\001\001\242\002\003GPB\252\002\026Google.Protocol"
"Buffersb\006proto3", 175);
"\n\005nanos\030\002 \001(\005BA\n\023com.google.protobufB\rDu"
"rationProtoP\001\240\001\001\242\002\003GPB\252\002\017Google.Protobuf"
"b\006proto3", 168);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/duration.proto", &protobuf_RegisterTypes);
Duration::default_instance_ = new Duration();

View File

@ -81,8 +81,8 @@ void protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n google/protobuf/field_mask.proto\022\017goog"
"le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
"F\n\023com.google.protobufB\016FieldMaskProtoP\001"
"\242\002\003GPB\252\002\026Google.ProtocolBuffersb\006proto3", 159);
"\?\n\023com.google.protobufB\016FieldMaskProtoP\001"
"\242\002\003GPB\252\002\017Google.Protobufb\006proto3", 152);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/field_mask.proto", &protobuf_RegisterTypes);
FieldMask::default_instance_ = new FieldMask();

View File

@ -165,9 +165,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto() {
"\000\0220\n\nlist_value\030\006 \001(\0132\032.google.protobuf."
"ListValueH\000B\006\n\004kind\"3\n\tListValue\022&\n\006valu"
"es\030\001 \003(\0132\026.google.protobuf.Value*\033\n\tNull"
"Value\022\016\n\nNULL_VALUE\020\000BF\n\023com.google.prot"
"obufB\013StructProtoP\001\240\001\001\242\002\003GPB\252\002\026Google.Pr"
"otocolBuffersb\006proto3", 581);
"Value\022\016\n\nNULL_VALUE\020\000B\?\n\023com.google.prot"
"obufB\013StructProtoP\001\240\001\001\242\002\003GPB\252\002\017Google.Pr"
"otobufb\006proto3", 574);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/struct.proto", &protobuf_RegisterTypes);
Struct::default_instance_ = new Struct();

View File

@ -82,9 +82,9 @@ void protobuf_AddDesc_google_2fprotobuf_2ftimestamp_2eproto() {
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\037google/protobuf/timestamp.proto\022\017googl"
"e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003"
"\022\r\n\005nanos\030\002 \001(\005BI\n\023com.google.protobufB\016"
"TimestampProtoP\001\240\001\001\242\002\003GPB\252\002\026Google.Proto"
"colBuffersb\006proto3", 178);
"\022\r\n\005nanos\030\002 \001(\005BB\n\023com.google.protobufB\016"
"TimestampProtoP\001\240\001\001\242\002\003GPB\252\002\017Google.Proto"
"bufb\006proto3", 171);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/timestamp.proto", &protobuf_RegisterTypes);
Timestamp::default_instance_ = new Timestamp();

View File

@ -262,9 +262,9 @@ void protobuf_AddDesc_google_2fprotobuf_2fwrappers_2eproto() {
"e\030\001 \001(\004\"\033\n\nInt32Value\022\r\n\005value\030\001 \001(\005\"\034\n\013"
"UInt32Value\022\r\n\005value\030\001 \001(\r\"\032\n\tBoolValue\022"
"\r\n\005value\030\001 \001(\010\"\034\n\013StringValue\022\r\n\005value\030\001"
" \001(\t\"\033\n\nBytesValue\022\r\n\005value\030\001 \001(\014BE\n\023com"
" \001(\t\"\033\n\nBytesValue\022\r\n\005value\030\001 \001(\014B>\n\023com"
".google.protobufB\rWrappersProtoP\001\242\002\003GPB\252"
"\002\026Google.ProtocolBuffersb\006proto3", 392);
"\002\017Google.Protobufb\006proto3", 385);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/wrappers.proto", &protobuf_RegisterTypes);
DoubleValue::default_instance_ = new DoubleValue();