Joshua Haberman
f597a24627
Update protobuf version
2020-05-12 12:49:46 -07:00
Jon Skeet
3c3646fa78
Implement HasPresence for C#
...
FieldDescriptor.HasPresence returns true if both ClearValue and HasValue (on the accessor) can be expected to work. Some fields have a working ClearValue, but no HasValue; HasPresence returns false for those fields.
Generally:
- Extension fields have presence if and only if they're singular
- Repeated fields do not support presence
- Map fields do not support presence
- Message fields support presence
- Oneof fields support presence (this includes synthetic oneof fields, so that covers proto3 optional singular fields)
- Proto2 singular primitive fields support presence
- Proto3 singular primitive fields do not support presence (unless they're in a oneof, covered above)
2020-05-12 10:58:05 -07:00
Jan Tattermusch
fc5ded36bc
Merge pull request #7434 from jtattermusch/csharp_expose_options
...
C#: Get rid of broken GetOption API and expose the "GetOptions()" method on descriptors instead
2020-05-12 10:56:51 -07:00
Jon Skeet
807ea2f352
Fix to C# support library code
...
(This was the only use of a HasXyz property for a message type.)
2020-05-12 10:54:45 -07:00
Jon Skeet
13df985bff
Regenerate C# code based on the previous commit
...
(This removes the Has/Clear members for message types in proto2.)
2020-05-12 10:54:45 -07:00
Joshua Haberman
a9f11d7d64
Updated version to 3.12.0-rc1. ( #7449 )
2020-04-30 15:34:10 -07:00
Jon Skeet
97737072f9
Add reflection support for proto3 optional fields
...
This is more involved than might be expected because the synthetic oneofs don't generate the properties we would usually expect to see.
2020-04-24 17:39:14 +01:00
Jon Skeet
bad9d753ae
Add unit tests for proto3 optional fields
...
(This isn't as exhaustive as it might be, but the behavior is basically the same as proto2 optional fields.)
2020-04-24 17:39:14 +01:00
Jon Skeet
b0649a088a
Regenerate C# code with the new generator, adding unittest_proto3_optional.proto
...
The changes in the existing proto2 code are solely around presence bits. The new generator allocated presence bits more efficiently. (Previously bits were sometimes allocated but never used.)
2020-04-24 17:39:14 +01:00
Joshua Haberman
74ad62759e
Sync from Piper @306496510
...
PROTOBUF_SYNC_PIPER
2020-04-14 12:55:41 -07:00
Joshua Haberman
503a2116aa
Sync from Piper @305053102
...
PROTOBUF_SYNC_PIPER
2020-04-06 09:57:03 -07:00
Joshua Haberman
c649397029
Set execute bit on files if and only if they begin with (#!). ( #7347 )
...
* Set execute bit on files if and only if they begin with (#!).
Git only tracks the 'x' (executable) bit on each file. Prior to this
CL, our files were a random mix of executable and non-executable.
This change imposes some order by making files executable if and only
if they have shebang (#!) lines at the beginning.
We don't have any executable binaries checked into the repo, so
we shouldn't need to worry about that case.
* Added fix_permissions.sh script to set +x iff a file begins with (#!).
2020-04-01 15:28:25 -07:00
Joshua Haberman
9c676d83ea
Regenerated protos with ./generate_descriptor_proto.sh
2020-03-31 16:35:09 -07:00
Jan Tattermusch
f57ae5eac3
Merge pull request #7279 from jtattermusch/ParseRawPrimitivesBenchmark
...
Add benchmark for measuring raw primitive parsing speed
2020-03-12 19:11:39 +01:00
Jan Tattermusch
a0cc0e83cb
Remove unnecessary branch from ReadTag ( #7289 )
...
* Remove unnecesary branch from ReadTag
* address comments
2020-03-11 10:29:37 -07:00
Jan Tattermusch
447b6bbad8
address review comments
2020-03-11 07:08:46 -04:00
Jan Tattermusch
b90d3bd854
add benchmark for measuring raw primitive parsing speed
2020-03-05 12:09:11 +01:00
Rafi Kamal
0eb476b696
Merge branch 3.11.x to master
2020-02-18 16:42:47 -08:00
Rafi Kamal
147fd0b710
Update Google.Protobuf.Tools.nuspec to remove 32-bit Mac protoc reference ( #7227 )
2020-02-18 10:23:20 -08:00
Rafi Kamal
1f2d6bf4b5
Remove 32-bit Mac binary from csharp build tools ( #7215 )
2020-02-14 12:50:45 -08:00
Jan Tattermusch
0e8f69e532
enforce recursion depth checking for unknown fields ( #7210 )
2020-02-14 10:17:06 -08:00
Rafi Kamal
c74057267d
Update protobuf version ( #7206 )
2020-02-12 14:41:16 -08:00
Jan Tattermusch
f20be83927
enforce recursion depth checking for unknown fields
2020-02-10 15:30:47 -08:00
Rafi Kamal
fedb2beee3
Merge pull request #6938 from ObsidianMinor/csharp/fix/6936 ( #7188 )
...
Fix latest ArgumentException for C# extensions
Co-authored-by: Jan Tattermusch <jtattermusch@users.noreply.github.com>
2020-02-10 10:46:19 -08:00
Rafi Kamal
345df38dd3
Update protobuf version ( #7143 )
2020-01-31 13:47:09 -08:00
Paul Yang
e8016753e3
Maven requires https connection ( #7110 ) ( #7114 )
2020-01-22 12:29:56 -08:00
Paul Yang
39f4240856
Maven requires https connection ( #7110 )
2020-01-20 19:23:06 -08:00
Rafi Kamal
ed8688de72
Merge pull request #7064 from rafi-kamal/3.11.x-202001071136
...
Merge branch 3.11.x to master
2020-01-08 12:24:20 -08:00
Brian Wignall
a104dffcb6
Fix typos ( #7050 )
...
Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos, with https://github.com/bwignall/typochecker to help automate the checking.
2020-01-08 10:18:20 -08:00
Rafi Kamal
4500f31a6a
Merge branch 3.11.x to master
2020-01-07 11:52:29 -08:00
Rafi Kamal
39492b68d8
Update protobuf version to 3.11.2 ( #7004 )
2019-12-10 17:50:28 -08:00
Jan Tattermusch
20b7fab0a9
Merge pull request #6674 from ObsidianMinor/csharp/general-cleanup
...
Cleanup various bits of Google.Protobuf
2019-12-05 10:38:10 +01:00
Jan Tattermusch
c8a56342d5
Merge pull request #6938 from ObsidianMinor/csharp/fix/6936
...
Fix latest ArgumentException for C# extensions
2019-12-05 10:36:47 +01:00
Sydney Acksman
367fd27732
Rename files and revert changes to generate protos script
2019-12-03 10:52:24 -06:00
Sydney Acksman
d5e964c8bb
Make test comment a summary
2019-12-03 10:46:34 -06:00
Rafi Kamal
b78c53f935
Update protobuf version to 3.11.1 ( #6972 )
2019-12-02 11:57:21 -08:00
Sydney Acksman
34f9497162
Use explicit comparer for extension identifiers
2019-12-02 13:56:21 -06:00
Sydney Acksman
1a0ff9551a
Add comment and Assert.DoesNotThrow to RequiredFieldsNoThrow
2019-12-02 13:50:51 -06:00
Sydney Acksman
145033c056
Adjust based on review feedback
2019-11-27 11:32:13 -06:00
Jan Tattermusch
058d5b0d71
Merge pull request #6910 from ObsidianMinor/csharp/conformance-failures
...
Fix conformance test failures for Google.Protobuf
2019-11-26 17:18:05 +01:00
Rafi Kamal
1d5375c621
Update protobuf version to 3.11.0 ( #6943 )
2019-11-25 15:12:00 -08:00
Jan Tattermusch
96e9ff3863
Revert "Revert "C# upgrade dotnet SDK ( #6877 )" ( #6888 )" ( #6920 )
...
This reverts commit f06800524f
.
2019-11-25 11:29:47 -08:00
Sydney Acksman
cd11d5414f
Improve test to make sure the extensions are actually loaded for CustomOptions
2019-11-24 14:56:35 -06:00
Sydney Acksman
2b0b838528
Add tests
2019-11-24 14:22:50 -06:00
Sydney Acksman
3c2a32a75f
Use Distinct on depended extensions to filter duplicate extensions
2019-11-24 14:22:26 -06:00
Rafi Kamal
6220db4ec4
Update protobuf version ( #6927 )
2019-11-21 19:10:04 -08:00
Sydney Acksman
f084d622c2
Add test for not throwing on missing required
2019-11-20 11:54:20 -06:00
Sydney Acksman
6f09cc3a0c
Fix readability.
2019-11-20 10:56:34 -06:00
Sydney Acksman
3457f88940
Fix formatting
2019-11-20 10:55:48 -06:00
Jan Tattermusch
77d33734cf
simpler fix
2019-11-20 12:48:49 +01:00