Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# Proto2 feature : Finale #5936

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5caa44e
Remove internal constraint on descriptor proto
ObsidianMinor Mar 15, 2019
4be0394
Remove proto2 check from generator
ObsidianMinor Mar 15, 2019
05712c6
Reapply custom option accessors from previous PR along with CustomOpt…
ObsidianMinor Mar 16, 2019
0387204
Make extension container classes public and modify conformance to tes…
ObsidianMinor Mar 16, 2019
43619bb
Uncomment option code in OneofDescriptor
ObsidianMinor Mar 21, 2019
6e7c43f
Add checks to make sure values retrieved from CustomOptions match ext…
ObsidianMinor Mar 21, 2019
8a57ec8
Add test protos to test project
ObsidianMinor Mar 21, 2019
a976158
Fix incorrect code gen for string fields with default values
ObsidianMinor Mar 23, 2019
8b7fb7d
Add tests for field presence and default values
ObsidianMinor Mar 23, 2019
8e917d1
Added FieldDescriptor.IsExtension and sealed ExtensionCollection
ObsidianMinor Mar 23, 2019
5b2f2c5
file descriptors and the syntax field are really weird with proto2
ObsidianMinor Mar 23, 2019
011427c
Fix issues from interactive rebase and regenerate code
ObsidianMinor May 4, 2019
cd65535
Added group roundtrip tests and fixed any issues discovered
ObsidianMinor May 4, 2019
134242b
Change input message to UnknownFieldSet tests to proto2 test message …
ObsidianMinor May 4, 2019
ebf0bfa
Add private "_Extensions" property to speed up IsInitialized checks
ObsidianMinor May 5, 2019
b78330b
Fix RepeatedExtensionValue.IsInitialized
ObsidianMinor May 5, 2019
8dc69ed
Remove unnecessary check in GetIsExtensionsInitialized
ObsidianMinor May 5, 2019
f4cfd2d
Remove dead HasValue code for ExtensionValue and add null-checks to E…
ObsidianMinor May 5, 2019
0c80570
Add ExtensionSet tests and add checks that non-message extension fiel…
ObsidianMinor May 5, 2019
9163a6f
Add tests for extension accessor
ObsidianMinor May 6, 2019
bf4f6c5
Make extension reflection helper use GetOrRegisterExtension
ObsidianMinor May 6, 2019
6b90ac1
Reorganize some tests
ObsidianMinor May 28, 2019
2b9d0fd
Add missing files to Makefile.am
ObsidianMinor May 28, 2019
29d5186
Regenerate testprotos.pb
ObsidianMinor Jul 2, 2019
47f2017
Review changes
ObsidianMinor Jul 2, 2019
29141f4
Fix default extension values being unused in FieldCodec
ObsidianMinor Jul 14, 2019
930db67
Revert changes for FieldPresenceAccessor
ObsidianMinor Jul 21, 2019
3237ad3
Rename ExtensionRegistry.Add(IEnumerable<Extension>) overload to AddR…
ObsidianMinor Jul 21, 2019
79cf8a8
Fix readability in FieldCodec.ForMessage/Group factories
ObsidianMinor Jul 21, 2019
c5fa0e0
Fix comment on IExtendableMessage.GetOrRegisterExtension
ObsidianMinor Jul 21, 2019
0436b8d
GetOrRegisterExtension -> GetOrInitializeExtension
ObsidianMinor Aug 1, 2019
6da14fa
Add GeneratedMessageTest.Proto2.cs to EXTRA_DIST
ObsidianMinor Aug 12, 2019
bdc6cd1
Expose Extension field in FieldDescriptor
ObsidianMinor Aug 13, 2019
4d5ae5b
Use proto2 and proto3 in unknown field tests
ObsidianMinor Aug 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions Makefile.am
Expand Up @@ -68,9 +68,12 @@ csharp_EXTRA_DIST= \
csharp/protos/map_unittest_proto3.proto \
csharp/protos/unittest_custom_options_proto3.proto \
csharp/protos/unittest_import_public_proto3.proto \
csharp/protos/unittest_import_public.proto \
csharp/protos/unittest_import_proto3.proto \
csharp/protos/unittest_import.proto \
csharp/protos/unittest_issues.proto \
csharp/protos/unittest_proto3.proto \
csharp/protos/unittest.proto \
csharp/src/AddressBook/AddPerson.cs \
csharp/src/AddressBook/Addressbook.cs \
csharp/src/AddressBook/AddressBook.csproj \
Expand Down Expand Up @@ -100,9 +103,11 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf.Test/Compatibility/TypeExtensionsTest.cs \
csharp/src/Google.Protobuf.Test/DeprecatedMemberTest.cs \
csharp/src/Google.Protobuf.Test/EqualityTester.cs \
csharp/src/Google.Protobuf.Test/ExtensionSetTest.cs \
csharp/src/Google.Protobuf.Test/FieldCodecTest.cs \
csharp/src/Google.Protobuf.Test/FieldMaskTreeTest.cs \
csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs \
csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs \
csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj \
csharp/src/Google.Protobuf.Test/IssuesTest.cs \
csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs \
Expand All @@ -119,13 +124,17 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf.Test/TestCornerCases.cs \
csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs \
csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs \
csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs \
csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs \
csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs \
csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs \
csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs \
csharp/src/Google.Protobuf.Test/WellKnownTypes/DurationTest.cs \
csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs \
Expand Down
6 changes: 5 additions & 1 deletion csharp/generate_protos.sh
Expand Up @@ -52,8 +52,12 @@ $PROTOC -Isrc -Icsharp/protos \
csharp/protos/unittest_proto3.proto \
csharp/protos/unittest_import_proto3.proto \
csharp/protos/unittest_import_public_proto3.proto \
csharp/protos/unittest.proto \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why these files originally got duplicated from the source of truth in https://github.com/protocolbuffers/protobuf/tree/master/src/google/protobuf - it might have been because C# didn't support proto2 back then. Maybe there would be an opportunity to de-dup the .proto files as a followup PR.

csharp/protos/unittest_import.proto \
csharp/protos/unittest_import_public.proto \
src/google/protobuf/unittest_well_known_types.proto \
src/google/protobuf/test_messages_proto3.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 \
Expand Down