From 367fd2773282a3007eecda3374056db2539b8076 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Tue, 3 Dec 2019 10:52:24 -0600 Subject: [PATCH] Rename files and revert changes to generate protos script --- Makefile.am | 12 +++---- csharp/generate_protos.sh | 30 +++++++++--------- ...936_a.proto => unittest_issue6936_a.proto} | 0 ...936_b.proto => unittest_issue6936_b.proto} | 4 +-- ...936_c.proto => unittest_issue6936_c.proto} | 4 +-- ...onsIssue6936A.cs => UnittestIssue6936A.cs} | 24 +++++++------- ...onsIssue6936B.cs => UnittestIssue6936B.cs} | 20 ++++++------ ...onsIssue6936C.cs => UnittestIssue6936C.cs} | 24 +++++++------- .../Reflection/CustomOptionsTest.cs | 6 ++-- csharp/src/Google.Protobuf.Test/testprotos.pb | Bin 330962 -> 330948 bytes 10 files changed, 62 insertions(+), 62 deletions(-) rename csharp/protos/{extensions_issue6936_a.proto => unittest_issue6936_a.proto} (100%) rename csharp/protos/{extensions_issue6936_b.proto => unittest_issue6936_b.proto} (61%) rename csharp/protos/{extensions_issue6936_c.proto => unittest_issue6936_c.proto} (78%) rename csharp/src/Google.Protobuf.Test.TestProtos/{ExtensionsIssue6936A.cs => UnittestIssue6936A.cs} (64%) rename csharp/src/Google.Protobuf.Test.TestProtos/{ExtensionsIssue6936B.cs => UnittestIssue6936B.cs} (86%) rename csharp/src/Google.Protobuf.Test.TestProtos/{ExtensionsIssue6936C.cs => UnittestIssue6936C.cs} (86%) diff --git a/Makefile.am b/Makefile.am index de08c29ddf..7ee57da299 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,12 +65,12 @@ csharp_EXTRA_DIST= \ csharp/keys/Google.Protobuf.snk \ csharp/keys/README.md \ csharp/protos/README.md \ - csharp/protos/extensions/extensions_a.proto \ - csharp/protos/extensions/extensions_b.proto \ - csharp/protos/extensions/extensions_c.proto \ csharp/protos/map_unittest_proto3.proto \ csharp/protos/old_extensions1.proto \ csharp/protos/old_extensions2.proto \ + csharp/protos/unittest_issue6936_a.proto \ + csharp/protos/unittest_issue6936_b.proto \ + csharp/protos/unittest_issue6936_c.proto \ csharp/protos/unittest_custom_options_proto3.proto \ csharp/protos/unittest_import_public_proto3.proto \ csharp/protos/unittest_import_public.proto \ @@ -131,9 +131,9 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf.Test/SampleNaNs.cs \ csharp/src/Google.Protobuf.Test/TestCornerCases.cs \ csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj \ - csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsA.cs \ - csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsB.cs \ - csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsC.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936A.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936B.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936C.cs \ csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs \ csharp/src/Google.Protobuf.Test.TestProtos/MapUnittestProto3.cs \ csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions1.cs \ diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh index 86b901410e..e6687c308e 100755 --- a/csharp/generate_protos.sh +++ b/csharp/generate_protos.sh @@ -49,21 +49,21 @@ $PROTOC -Isrc -Icsharp/protos \ --descriptor_set_out=csharp/src/Google.Protobuf.Test/testprotos.pb \ --include_source_info \ --include_imports \ - map_unittest_proto3.proto \ - unittest_issues.proto \ - unittest_custom_options_proto3.proto \ - unittest_proto3.proto \ - unittest_import_proto3.proto \ - unittest_import_public_proto3.proto \ - unittest.proto \ - unittest_import.proto \ - unittest_import_public.proto \ - extensions_issue6936_a.proto \ - extensions_issue6936_b.proto \ - extensions_issue6936_c.proto \ - google/protobuf/unittest_well_known_types.proto \ - google/protobuf/test_messages_proto3.proto \ - google/protobuf/test_messages_proto2.proto + csharp/protos/map_unittest_proto3.proto \ + csharp/protos/unittest_issues.proto \ + csharp/protos/unittest_custom_options_proto3.proto \ + csharp/protos/unittest_proto3.proto \ + csharp/protos/unittest_import_proto3.proto \ + csharp/protos/unittest_import_public_proto3.proto \ + csharp/protos/unittest.proto \ + csharp/protos/unittest_import.proto \ + csharp/protos/unittest_import_public.proto \ + csharp/protos/unittest_issue6936_a.proto \ + csharp/protos/unittest_issue6936_b.proto \ + csharp/protos/unittest_issue6936_c.proto \ + src/google/protobuf/unittest_well_known_types.proto \ + src/google/protobuf/test_messages_proto3.proto \ + src/google/protobuf/test_messages_proto2.proto # AddressBook sample protos $PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \ diff --git a/csharp/protos/extensions_issue6936_a.proto b/csharp/protos/unittest_issue6936_a.proto similarity index 100% rename from csharp/protos/extensions_issue6936_a.proto rename to csharp/protos/unittest_issue6936_a.proto diff --git a/csharp/protos/extensions_issue6936_b.proto b/csharp/protos/unittest_issue6936_b.proto similarity index 61% rename from csharp/protos/extensions_issue6936_b.proto rename to csharp/protos/unittest_issue6936_b.proto index 2027b7b4d7..8f71683ba6 100644 --- a/csharp/protos/extensions_issue6936_b.proto +++ b/csharp/protos/unittest_issue6936_b.proto @@ -1,13 +1,13 @@ syntax = "proto3"; -import "extensions_issue6936_a.proto"; +import "unittest_issue6936_a.proto"; package unittest_issues; option csharp_namespace = "UnitTest.Issues.TestProtos"; // This file is used as part of a unit test for issue 6936 -// We don't need to use it, we just have to import it in "extensions_issue6936_c.proto" +// We don't need to use it, we just have to import it in "unittest_issue6936_c.proto" message Foo { option (opt) = "foo"; diff --git a/csharp/protos/extensions_issue6936_c.proto b/csharp/protos/unittest_issue6936_c.proto similarity index 78% rename from csharp/protos/extensions_issue6936_c.proto rename to csharp/protos/unittest_issue6936_c.proto index d33794dc11..40004ecaae 100644 --- a/csharp/protos/extensions_issue6936_c.proto +++ b/csharp/protos/unittest_issue6936_c.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -import "extensions_issue6936_a.proto"; -import "extensions_issue6936_b.proto"; +import "unittest_issue6936_a.proto"; +import "unittest_issue6936_b.proto"; package unittest_issues; diff --git a/csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsIssue6936A.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936A.cs similarity index 64% rename from csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsIssue6936A.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936A.cs index 95a746b239..56fde4f00a 100644 --- a/csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsIssue6936A.cs +++ b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936A.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: extensions_issue6936_a.proto +// source: unittest_issue6936_a.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,32 +11,32 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace UnitTest.Issues.TestProtos { - /// Holder for reflection information generated from extensions_issue6936_a.proto - public static partial class ExtensionsIssue6936AReflection { + /// Holder for reflection information generated from unittest_issue6936_a.proto + public static partial class UnittestIssue6936AReflection { #region Descriptor - /// File descriptor for extensions_issue6936_a.proto + /// File descriptor for unittest_issue6936_a.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } private static pbr::FileDescriptor descriptor; - static ExtensionsIssue6936AReflection() { + static UnittestIssue6936AReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChxleHRlbnNpb25zX2lzc3VlNjkzNl9hLnByb3RvEg91bml0dGVzdF9pc3N1", - "ZXMaIGdvb2dsZS9wcm90b2J1Zi9kZXNjcmlwdG9yLnByb3RvOi4KA29wdBIf", - "Lmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjQhgMgASgJQh2qAhpV", - "bml0VGVzdC5Jc3N1ZXMuVGVzdFByb3Rvc2IGcHJvdG8z")); + "Chp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90bxIPdW5pdHRlc3RfaXNzdWVz", + "GiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90bzouCgNvcHQSHy5n", + "b29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY0IYDIAEoCUIdqgIaVW5p", + "dFRlc3QuSXNzdWVzLlRlc3RQcm90b3NiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pb::Extension[] { ExtensionsIssue6936AExtensions.Opt }, null)); + new pbr::GeneratedClrTypeInfo(null, new pb::Extension[] { UnittestIssue6936AExtensions.Opt }, null)); } #endregion } - /// Holder for extension identifiers generated from the top level of extensions_issue6936_a.proto - public static partial class ExtensionsIssue6936AExtensions { + /// Holder for extension identifiers generated from the top level of unittest_issue6936_a.proto + public static partial class UnittestIssue6936AExtensions { public static readonly pb::Extension Opt = new pb::Extension(50000, pb::FieldCodec.ForString(400002, "")); } diff --git a/csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsIssue6936B.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936B.cs similarity index 86% rename from csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsIssue6936B.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936B.cs index 2404906de4..6b816f739b 100644 --- a/csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsIssue6936B.cs +++ b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936B.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: extensions_issue6936_b.proto +// source: unittest_issue6936_b.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,24 +11,24 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace UnitTest.Issues.TestProtos { - /// Holder for reflection information generated from extensions_issue6936_b.proto - public static partial class ExtensionsIssue6936BReflection { + /// Holder for reflection information generated from unittest_issue6936_b.proto + public static partial class UnittestIssue6936BReflection { #region Descriptor - /// File descriptor for extensions_issue6936_b.proto + /// File descriptor for unittest_issue6936_b.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } private static pbr::FileDescriptor descriptor; - static ExtensionsIssue6936BReflection() { + static UnittestIssue6936BReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChxleHRlbnNpb25zX2lzc3VlNjkzNl9iLnByb3RvEg91bml0dGVzdF9pc3N1", - "ZXMaHGV4dGVuc2lvbnNfaXNzdWU2OTM2X2EucHJvdG8iDgoDRm9vOgeCtRgD", - "Zm9vQh2qAhpVbml0VGVzdC5Jc3N1ZXMuVGVzdFByb3Rvc2IGcHJvdG8z")); + "Chp1bml0dGVzdF9pc3N1ZTY5MzZfYi5wcm90bxIPdW5pdHRlc3RfaXNzdWVz", + "Ghp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90byIOCgNGb286B4K1GANmb29C", + "HaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJvdG9zYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.ExtensionsIssue6936AReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.UnittestIssue6936AReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Foo), global::UnitTest.Issues.TestProtos.Foo.Parser, null, null, null, null, null) })); @@ -45,7 +45,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::UnitTest.Issues.TestProtos.ExtensionsIssue6936BReflection.Descriptor.MessageTypes[0]; } + get { return global::UnitTest.Issues.TestProtos.UnittestIssue6936BReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsIssue6936C.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936C.cs similarity index 86% rename from csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsIssue6936C.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936C.cs index aeffcc1e9e..a8a73f6cb6 100644 --- a/csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsIssue6936C.cs +++ b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936C.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: extensions_issue6936_c.proto +// source: unittest_issue6936_c.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,26 +11,26 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace UnitTest.Issues.TestProtos { - /// Holder for reflection information generated from extensions_issue6936_c.proto - public static partial class ExtensionsIssue6936CReflection { + /// Holder for reflection information generated from unittest_issue6936_c.proto + public static partial class UnittestIssue6936CReflection { #region Descriptor - /// File descriptor for extensions_issue6936_c.proto + /// File descriptor for unittest_issue6936_c.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } private static pbr::FileDescriptor descriptor; - static ExtensionsIssue6936CReflection() { + static UnittestIssue6936CReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChxleHRlbnNpb25zX2lzc3VlNjkzNl9jLnByb3RvEg91bml0dGVzdF9pc3N1", - "ZXMaHGV4dGVuc2lvbnNfaXNzdWU2OTM2X2EucHJvdG8aHGV4dGVuc2lvbnNf", - "aXNzdWU2OTM2X2IucHJvdG8iMQoDQmFyEiEKA2ZvbxgBIAEoCzIULnVuaXR0", - "ZXN0X2lzc3Vlcy5Gb286B4K1GANiYXJCHaoCGlVuaXRUZXN0Lklzc3Vlcy5U", - "ZXN0UHJvdG9zYgZwcm90bzM=")); + "Chp1bml0dGVzdF9pc3N1ZTY5MzZfYy5wcm90bxIPdW5pdHRlc3RfaXNzdWVz", + "Ghp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90bxoadW5pdHRlc3RfaXNzdWU2", + "OTM2X2IucHJvdG8iMQoDQmFyEiEKA2ZvbxgBIAEoCzIULnVuaXR0ZXN0X2lz", + "c3Vlcy5Gb286B4K1GANiYXJCHaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJv", + "dG9zYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.ExtensionsIssue6936AReflection.Descriptor, global::UnitTest.Issues.TestProtos.ExtensionsIssue6936BReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.UnittestIssue6936AReflection.Descriptor, global::UnitTest.Issues.TestProtos.UnittestIssue6936BReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Bar), global::UnitTest.Issues.TestProtos.Bar.Parser, new[]{ "Foo" }, null, null, null, null) })); @@ -47,7 +47,7 @@ namespace UnitTest.Issues.TestProtos { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::UnitTest.Issues.TestProtos.ExtensionsIssue6936CReflection.Descriptor.MessageTypes[0]; } + get { return global::UnitTest.Issues.TestProtos.UnittestIssue6936CReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs index bf5f5ad9c3..bfee5f5d43 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs @@ -196,11 +196,11 @@ namespace Google.Protobuf.Test.Reflection [Test] public void MultipleImportOfSameFileWithExtension() { - var descriptor = ExtensionsIssue6936CReflection.Descriptor; + var descriptor = UnittestIssue6936CReflection.Descriptor; var foo = Foo.Descriptor; var bar = Bar.Descriptor; - AssertOption("foo", foo.CustomOptions.TryGetString, ExtensionsIssue6936AExtensions.Opt, foo.GetOption); - AssertOption("bar", bar.CustomOptions.TryGetString, ExtensionsIssue6936AExtensions.Opt, bar.GetOption); + AssertOption("foo", foo.CustomOptions.TryGetString, UnittestIssue6936AExtensions.Opt, foo.GetOption); + AssertOption("bar", bar.CustomOptions.TryGetString, UnittestIssue6936AExtensions.Opt, bar.GetOption); } private void AssertOption(T expected, OptionFetcher fetcher, Extension extension, Func, T> descriptorOptionFetcher) where D : IExtendableMessage diff --git a/csharp/src/Google.Protobuf.Test/testprotos.pb b/csharp/src/Google.Protobuf.Test/testprotos.pb index 7f2e310798336800c4d2d5b7eee968dd2147937b..d00db7fdeb7639fc7be4590acb156234abafd3f3 100644 GIT binary patch delta 199 zcmcaKQ{>1@k%kt=7N#xC_cVFlGIL3l=4F6g3C?cuFKrPqr%0>#l*}g#LUc~((bLtyxm)m HrTrcNK9@bU delta 173 zcmX>yQ{>W2k%kt=7N#xC_cU4FGjqvIPt;}>-TqaR`6eSvCyYP+sW!7DBSdbxkPfps zW7Bjm9cEcZwdol;%nJN-7`d2O7=&238F(3u`WdHZ>oF%!|E0ss2Qp25x~eX-KFfEg zVKS3LW(zV&K@8(e)GH{;FUf~;r*F|^uH{kV;^bmtW)xy(W>9Ol)nndntH;uQ4*=nt BE2sbf