Commit Graph

748 Commits

Author SHA1 Message Date
Sydney Acksman
71ac3e5c0e Fix exception message on unsupported request output format 2019-11-19 17:50:53 -06:00
Sydney Acksman
e2e70a8a42 Fix conformance test failures for Google.Protobuf 2019-11-19 17:50:46 -06:00
Rafi Kamal
cd7b27be38 Update protobuf version (#6898) 2019-11-19 15:32:13 -08:00
Sydney Acksman
71c492da3c Add some missing null-checks
Remove IsInitialized checks accidentally left in MessageParser
Simplify ExtensionCollection.CrossLink
2019-11-19 12:34:19 -06:00
Rafi Kamal
3cc55d6167
Update protobuf version (#6898) 2019-11-15 17:44:10 -08:00
Jie Luo
f06800524f
Revert "C# upgrade dotnet SDK (#6877)" (#6888)
This reverts commit 0c8acb6c8d.
2019-11-14 09:49:59 -08:00
Jan Tattermusch
0c8acb6c8d C# upgrade dotnet SDK (#6877)
* upgrade dotnet SDK

* upgrade dotnet SDK version in global.json
2019-11-14 09:39:31 -08:00
Rafi Kamal
394f5c8c0f Whitelist newly added conformance test failures for Ruby, C#, and PHP 2019-11-12 13:38:58 -08:00
Rafi Kamal
58d4420e2d Down Integrate Internal Changes 2019-11-12 13:38:58 -08:00
Sydney Acksman
b84929f7fb Rename .CodeGen to .TestProtos in Makefile and script 2019-11-08 08:41:26 -06:00
Sydney Acksman
51fa766baa Fix typos
Bring .NET Framework target down to 4.5
Rename project in comment
2019-11-08 07:23:51 -06:00
Sydney Acksman
a70c796988 Add project to solution 2019-11-08 07:23:51 -06:00
Sydney Acksman
8da87c6202 Rename Google.Protobuf.Test.CodeGen to Google.Protobuf.Test.TestProtos 2019-11-08 07:23:51 -06:00
Sydney Acksman
2bb49712aa Add comment to summarize project
Set lang version to C# 3.0
Add .NET Standard 2.0 target
Fix partial diagnostic string since it requires C# 6
2019-11-08 07:23:50 -06:00
Sydney Acksman
63780dfb28 Rebase on master 2019-11-08 07:23:50 -06:00
Sydney Acksman
a85c4a3299 Move generated test code to a seperate lib 2019-11-08 07:23:50 -06:00
Sydney Acksman
c04a02774d Change _Extensions property to normal body rather than expression 2019-11-07 15:30:12 -06:00
Jan Tattermusch
0150f7f532
Merge pull request #6843 from chrisdunelm/csharp_wrapper_primitive_opts
C#: Optimize parsing of some primitive and wrapper types
2019-11-05 18:04:53 +01:00
Chris Bacon
d22eaded5c Remove unneeded exception methods 2019-11-05 11:39:31 +00:00
Chris Bacon
2ac8946ee3 Allow extra fields in wrapper messages, more tests. 2019-11-04 21:35:38 +00:00
Chris Bacon
e305e56cad C#: Optimize parsing of some primitive and wrapper types 2019-11-04 20:26:27 +00:00
Sydney Acksman
e119a432a8 Use 3 parameter Encoding.FromBytes for default string values 2019-11-04 12:31:28 -06:00
Jan Tattermusch
b8b1b6793f add regenerate C# protos 2019-11-04 18:21:22 +01:00
Jan Tattermusch
85a87ed3cb add benchmark for wrapper type parsing 2019-11-04 18:21:22 +01:00
Jan Tattermusch
c81bad1b04 add wrapper_benchmark_messages.proto 2019-11-04 18:21:22 +01:00
Jan Tattermusch
9417a310d3
Merge pull request #6824 from jskeet/fix-extensions
Fix reflection access when using old generated code
2019-11-04 14:12:06 +01:00
Jon Skeet
7282f29ced Avoid NullReferenceException when accessing CustomOptions
Even though the property is deprecated, it still shouldn't throw.
2019-10-30 11:59:09 +00:00
Jon Skeet
9b5fdb0938 Ignore incomplete extensions when building a FileDescriptor
FileDescriptor construction uses an extension registry including extensions from imports. If these were created using an older version of protoc, the FieldDescriptor.Extension property may be null; we ignore such extensions rather than failing.
2019-10-30 09:47:45 +00:00
Jon Skeet
7581fd5ea6 Tests for issue 6822
(The implementation to fix this is in the following commit.)
2019-10-30 09:46:24 +00:00
Jon Skeet
e613ba6980 Add braces around single-statement if/foreach 2019-10-30 09:45:00 +00:00
Jan Tattermusch
c08b7512cf
Merge pull request #6759 from ObsidianMinor/csharp/extension-length-checks
Add length checks to ExtensionCollection
2019-10-22 08:24:43 +02:00
Jan Tattermusch
2f7f670134
Merge pull request #6530 from prat0088/csharp-ensuresize
c# feature(RepeatedField): Capacity property to resize the internal array
2019-10-18 17:35:12 +02:00
Sydney Acksman
f50bc62feb Add length checks to ExtensionCollection 2019-10-11 20:23:07 -05:00
Rafi Kamal
2ed41359fe Update version to 3.11.0-RC0 2019-10-03 14:24:27 -07:00
Rafi Kamal
97c7c3fc97 Merge 3.10.x to master 2019-10-03 14:03:38 -07:00
Sydney Acksman
c54ff8d0dc Fix many proto2 C# doc comments 2019-09-19 04:39:40 -05:00
Jie Luo
2a4657971d
Update to 3.10.0-rc0 (#6660)
* Cherry pick changes on update_version.py #6643

* Update version to 3.10.0-rc-0

* Do not add rc0 to php packages.xml
2019-09-18 13:30:03 -07:00
Rafi Kamal
5021cd3419 Update protobuf version 2019-09-12 13:50:24 -07:00
Vperus
8e6141a63d [csharp] Fix typo 2019-09-11 10:36:00 -07:00
Rafi Kamal
56bf637221 Update protobuf version 2019-09-05 09:47:52 -07:00
Jan Tattermusch
e2f5da65ee C#: add System.Memory dependency for net45 too (#6317)
* introduce GOOGLE_PROTOBUF_SUPPORT_SYSTEM_MEMORY

* allow building net45 target on unix systems too

* add Span<> support on net45 as well
2019-09-03 10:17:21 -07:00
Sydney Acksman
4d5ae5b4a4 Use proto2 and proto3 in unknown field tests 2019-08-29 18:07:02 -05:00
Sydney Acksman
bdc6cd1d0b Expose Extension field in FieldDescriptor 2019-08-23 17:29:59 -05:00
Sydney Acksman
0436b8db85 GetOrRegisterExtension -> GetOrInitializeExtension
Add comment explaining IExtensionMessage instability
2019-08-23 17:29:59 -05:00
Sydney Acksman
c5fa0e08c7 Fix comment on IExtendableMessage.GetOrRegisterExtension 2019-08-23 17:29:59 -05:00
Sydney Acksman
79cf8a8bae Fix readability in FieldCodec.ForMessage/Group factories 2019-08-23 17:29:59 -05:00
Sydney Acksman
3237ad39f8 Rename ExtensionRegistry.Add(IEnumerable<Extension>) overload to AddRange 2019-08-23 17:29:58 -05:00
Sydney Acksman
930db675ca Revert changes for FieldPresenceAccessor 2019-08-23 17:29:58 -05:00
Sydney Acksman
29141f482c Fix default extension values being unused in FieldCodec 2019-08-23 17:29:58 -05:00
Sydney Acksman
47f2017cf3 Review changes
* Add Syntax enum and make file syntax checks check the enum
 * Made IsPacked a normal get method without ternary op
 * Moved IFieldAccessor.HasValue to IFieldPresenceAccessor
 * Change naming of GetIsExtensionsInitialized
 * Fixed stray text in summary text
2019-08-23 17:29:58 -05:00
Sydney Acksman
29d5186867 Regenerate testprotos.pb 2019-08-23 17:29:58 -05:00
Sydney Acksman
6b90ac13e0 Reorganize some tests 2019-08-23 17:16:37 -05:00
Sydney Acksman
bf4f6c5431 Make extension reflection helper use GetOrRegisterExtension 2019-08-23 17:16:37 -05:00
Sydney Acksman
9163a6f1ad Add tests for extension accessor 2019-08-23 17:16:37 -05:00
Sydney Acksman
0c80570a8b Add ExtensionSet tests and add checks that non-message extension fields don't fail initialization checks 2019-08-23 17:16:37 -05:00
Sydney Acksman
f4cfd2def3 Remove dead HasValue code for ExtensionValue and add null-checks to ExtensionSet.Set 2019-08-23 17:16:37 -05:00
Sydney Acksman
8dc69ede45 Remove unnecessary check in GetIsExtensionsInitialized 2019-08-23 17:16:37 -05:00
Sydney Acksman
b78330b21d Fix RepeatedExtensionValue.IsInitialized 2019-08-23 17:16:37 -05:00
Sydney Acksman
ebf0bfaed8 Add private "_Extensions" property to speed up IsInitialized checks 2019-08-23 17:16:37 -05:00
Sydney Acksman
134242bc46 Change input message to UnknownFieldSet tests to proto2 test message to test groups. 2019-08-23 17:16:37 -05:00
Sydney Acksman
cd65535423 Added group roundtrip tests and fixed any issues discovered 2019-08-23 17:16:37 -05:00
Sydney Acksman
011427c9d8 Fix issues from interactive rebase and regenerate code 2019-08-23 17:16:37 -05:00
Sydney Acksman
5b2f2c5292 file descriptors and the syntax field are really weird with proto2 2019-08-23 17:16:37 -05:00
Sydney Acksman
8e917d1688 Added FieldDescriptor.IsExtension and sealed ExtensionCollection 2019-08-23 17:16:37 -05:00
Sydney Acksman
8b7fb7d0f4 Add tests for field presence and default values
Adjust APIs for extensions to properly return default values for extensions
Fix issues with IsInitialized and proto2 field reflection
2019-08-23 17:16:36 -05:00
Sydney Acksman
a976158b1c Fix incorrect code gen for string fields with default values 2019-08-23 17:16:36 -05:00
Sydney Acksman
8a57ec847b Add test protos to test project
Fix generated group code missing end group tag case
Fix generated field classes searching for presence index for extensions
2019-08-23 17:16:36 -05:00
Sydney Acksman
6e7c43fc68 Add checks to make sure values retrieved from CustomOptions match extension values 2019-08-23 17:16:36 -05:00
Sydney Acksman
43619bb6b2 Uncomment option code in OneofDescriptor 2019-08-23 17:16:36 -05:00
ObsidianMinor
03872044b1 Make extension container classes public and modify conformance to test proto2 messages 2019-08-23 17:16:36 -05:00
Sydney Acksman
05712c6791 Reapply custom option accessors from previous PR along with CustomOptions accessor deprecations 2019-08-23 17:16:36 -05:00
Sydney Acksman
5caa44e056 Remove internal constraint on descriptor proto 2019-08-23 17:16:36 -05:00
Rafi Kamal
4f02f056b5 Down integrate to GitHub 2019-08-22 17:33:01 -07:00
Tristan Pratt
da5740082e c# feature(RepeatedField): Capacity property to resize the internal array
This property is useful for efficiently initializing long RepeatedFields.

I used System.Collections.Generic.List's design as a model.  It should feel the most familiar to C# developers.
2019-08-17 19:12:00 -04:00
Jie Luo
43156775be
Merge 3.9.x 201908071359 to master (#6484)
* Add changelog for 3.9.x

* Revert "Make php message class final to avoid mocking (#6277)" (#6324)

This reverts commit 7f84a94366.
This is just temporary. Eventually, we still want to roll forward this
change. Some users are complaining they need more time to clean up their
code.

* Update extract_includes.bat.in

File io_win32.h is not in directory google\protobuf\stubs under directory google\protobuf\io

* Set oneof case in array constructor (#6351)

Forgot to set it previously.

* Update protobuf version (#6366)

* Drop building wheel for python 3.4 (#6406)

https://github.com/matthew-brett/multibuild/pull/240

* Fix binary compatibility in FieldCodec factory methods (#6380) (#6424)

* Fix binary compatibility in FieldCodec factory messages

* Make default value parameter for current factories required

* Route old methods through default value overloads

* Remove ExtensionRegistry.Add(params) overload

* Rename ExtensionRegistry.Add(IEnumerable<Extension>) overload to AddRange

* Edit naming of parameters in Extension classes

* * Fix add API warnings to docs for extension APIs
* Rename internal ExtensionSet.GetValue to TryGetValue

* Disable javadoc error (#6371)

* Disable javadoc error

Actual fixes of the javadoc will be followed up

* Remove duplicated configuration

* Update javadoc plugin version

* Updated Bazel test script to use most recent Bazel version (#6413) (#6433)

I'm not exactly sure why, but this fixes the failing Bazel presubmit
test. Using the most recent version seems like a good idea anyway so
that we can make sure we're compatible with any new Bazel changes.

* [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl

* No need to update version in generated code (#6471)

generate_descriptor will handle that

* Update protobuf version (#6472)
2019-08-09 13:21:18 -07:00
Jie Luo
d1eeb852fc
compatibility test between last released and current for java python php (#6441)
* compatibility tests between last released and the current version
2019-07-31 17:49:26 -07:00
Jie Luo
e399308ef0 Add csharp compatibility tests between last released and the current version (#6407)
* Add csharp compatibility tests for 3.7.0

* Add compatibility test between last major version with current for C#

* Update last version number

* compatibility tests between last released and the current version

* fix typo
2019-07-25 14:31:00 -07:00
Sydney Acksman
9857d636fd Fix binary compatibility in FieldCodec factory methods (#6380)
* Fix binary compatibility in FieldCodec factory messages

* Make default value parameter for current factories required

* Route old methods through default value overloads
2019-07-19 16:25:00 -07:00
Paul Yang
7bff8393ca
Down Integrate to GitHub (#6414)
* Down integrate to GitHub

* Fix broken tests
2019-07-19 14:49:01 -07:00
Hao Nguyen
ef5e8f4aa7 Update C# generated proto file 2019-06-17 14:05:40 -07:00
Hao Nguyen
638720274b Update version to 3.9.0 2019-06-17 09:34:50 -07:00
Hao Nguyen
bb1c0adedf Remove unused fields 2019-06-12 12:32:51 -07:00
Hao Nguyen
634d704d23 Merge branch '3.8.x' into 3.8.x-201905311515 2019-05-31 15:18:39 -07:00
Hao Nguyen
582927ae2a Update generated files 2019-05-21 16:42:33 -07:00
Hao Nguyen
b0d648664d Update protobuf version 2019-05-21 14:07:13 -07:00
Hao Nguyen
2352a30e66 Revert "Update protobuf version"
This reverts commit 6d96493b31.
2019-05-21 13:49:06 -07:00
Hao Nguyen
6d96493b31 Update protobuf version 2019-05-21 13:31:01 -07:00
Sydney Acksman
9e89b6e70a C# Proto2 feature : Extensions (#5350)
* Compiler changes (extensions)

* Generated changes (extensions)

* Library changes (extensions)

* Adjusted a summary to indicate ContainingType can be null for extensions

* Compiler changes (custom option review + access level review)

* Generated code changes (custom options + access review)

* Library changes (custom options + access review)

* Support C# 6 with library changes

* Access HasValue by property

* Set access level of all extension classes to internal (revert in next PR)

* Added null checks to custom options

* Rebase on master and regenerate Conformance

* Removed second dictionary from ExtensionSet

* Rebased compiler changes

* Rebased generated code changes

* Rebased library changes + review changes

* Add more safety checks to extension accessors

* Remove instances where extension sets were unnecessarily allocated

* Remove cleared items from sets
Empty sets are now made null
IExtensionMessage -> IExtendableMessage

* Remove dead code from IExtensionValue impls

* Clean both repeated and single value extensions

* Add GetOrRegister method for repeated fields and allow clearing repeated extensions

* Add type safe ClearExtension methods, remove non-generic IExtendableMessage interface.

* Simplify ExtensionSet.TryMergeFieldFrom

* Rebase on master to resolve conflicts

* Fix Makefile.am

* Add ObjectIntPair to Makefile.am
2019-05-03 13:54:41 -07:00
Hao Nguyen
37a89f8e1a Update version to 3.8.0 2019-04-23 16:14:52 -07:00
Hao Nguyen
3d69bad4b2 Update generated proto and remove a test from failure_list 2019-04-10 13:33:56 -07:00
Hao Nguyen
ef1e8e7172 Add module for JavaLite and fix builds 2019-04-09 06:48:01 -07:00
Adam Cozzette
8645d893ab Merge branch '3.7.x' into merge-3-7-x 2019-03-26 14:32:20 -07:00
Paul Yang
6973c3a504
Update version number to 3.7.1 (#5947)
* Update version number to 3.7.1

* Update version number in port_def.inc
2019-03-26 09:30:12 -07:00
Hao Nguyen
71f2996d7c Update generated descriptor files 2019-03-20 15:39:36 -07:00
Jan Tattermusch
ec3d94819d add System.Memory dependency (#5835)
also add useful Span-based methods for ByteString
2019-03-18 16:28:02 -07:00
Jon Skeet
2de68bc33a Make the C# benchmarks non-packable 2019-03-15 09:39:50 +00:00
Jan Tattermusch
f071c9e0f3 fix source stepping by upgrading sourcelink (#5891) 2019-03-14 14:58:35 -07:00
Jon Skeet
233f4865ee First pass at benchmarking for C# 2019-03-13 15:26:57 +00:00
Paul Yang
4b145b1c7f
Parse nested listvalue in json for ruby (#5867)
* Add conformance test for nested listvalue

* Fix upb for parsing repeated Value/ListValue

* Add failed repeated ListValue conformance test into php failure list
2019-03-12 10:56:58 -07:00
Jan Tattermusch
60a889e048 make check for distinct hashcode optional 2019-03-12 08:56:32 -04:00