From aa77eab622fe0ccc6cf7ec8a3fce1005dd759562 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Fri, 10 Nov 2017 09:50:02 +0000 Subject: Move C#-only test protos to csharp/protos unittest_proto3 had been changed in a very backward-incompatible way which was never going to work with C# as it imports proto2 messages. This is now a copy of the old file, but with a package name change for compatibility with the remaining files in src/google/protobuf. The other moves are for files that are only used by C#. --- csharp/generate_protos.sh | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'csharp/generate_protos.sh') diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh index d2f47479..5c748e35 100755 --- a/csharp/generate_protos.sh +++ b/csharp/generate_protos.sh @@ -3,7 +3,7 @@ # You first need to make sure protoc has been built (see instructions on # building protoc in root of this repository) -set -ex +set -e # cd to repository root pushd $(dirname $0)/.. @@ -40,28 +40,20 @@ $PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf \ src/google/protobuf/type.proto \ src/google/protobuf/wrappers.proto -# Test protos where the namespace matches the target location -$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf.Test \ - --csharp_opt=base_namespace=Google.Protobuf \ - src/google/protobuf/map_unittest_proto3.proto \ - src/google/protobuf/unittest_proto3.proto \ - src/google/protobuf/unittest_import_proto3.proto \ - src/google/protobuf/unittest_import_public_proto3.proto \ - src/google/protobuf/unittest_well_known_types.proto - -# Different base namespace to the protos above -$PROTOC -Isrc -Icsharp/protos --csharp_out=csharp/src/Google.Protobuf.Test \ - --csharp_opt=base_namespace=UnitTest.Issues \ +# Test protos +$PROTOC -Isrc -Icsharp/protos \ + --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \ + csharp/protos/map_unittest_proto3.proto \ csharp/protos/unittest_issues.proto \ - csharp/protos/unittest_custom_options_proto3.proto - -# Don't specify a base namespace at all; we just want to make sure the -# results end up in TestProtos. -$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \ + 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 \ + src/google/protobuf/unittest_well_known_types.proto \ src/google/protobuf/test_messages_proto3.proto # AddressBook sample protos -$PROTOC -Iexamples --csharp_out=csharp/src/AddressBook \ +$PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \ examples/addressbook.proto $PROTOC -Iconformance -Isrc --csharp_out=csharp/src/Google.Protobuf.Conformance \ -- cgit v1.2.3