Commit Graph

713 Commits

Author SHA1 Message Date
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
Jan Tattermusch
e6a22c9777 test all frameworks on windows 2019-03-12 05:17:13 -04:00
Jan Tattermusch
753daae027 use netcoreapp2.1 for testing 2019-03-12 05:16:52 -04:00
Jan Tattermusch
79c32b17ac add scripts for C# windows tests 2019-03-12 05:16:52 -04:00
Sydney Acksman
15fab9109d Bump target frameworks of C# programs from netcoreapp1.0 to netcoreapp2.1 (#5838)
* Bump target frameworks from netcoreapp1.0 to netcoreapp2.2.
Move global.json up to root of repo, change SDK ver to 2.2.100
Change .net core sdk in dockerfile for kokoro to ver 2.2.100

* Re-add curl install

* Change all exe target to 2.1

* Fix incorrect versions in global.json and Dockerfile

* Downgrade version to 2.1 to match exe targets

* introduce separate testing Dockerfile for C#

* revert changes to the shared Dockerfile

* use netcoreapp2.1 for C# conformance tests

* use language specific dockerfile for testing C#

* Edit compatibility tests script to use parameters instead of file copies

* install dotnet SDK on windows before running the tests

* update csharp_EXTRA_DIST
2019-03-11 13:03:58 -07:00
WilliamWhispell
59284450fa Use fixed size for bool, float and double field in codec (#5810)
* Improve C# serialization performance of repeated fields for primitives.

* Changes based on feedback.

* Change compatibility tests to chec float, bool and double are fixed

* Changes based on feedback.

* In the compute methods use the newly created constants
2019-03-08 14:35:21 -08:00
Bo Yang
cb6fa92ee8 Merge branch '3.7.x' 2019-03-04 10:18:18 -08:00
Paul Yang
582743bf40
Update version number to 3.7.0 (#5793)
* Update version number to 3.7.0

* Add php/releash.sh to Makefile.am

* Make cpp_distcheck exit on fail
2019-02-28 12:55:14 -08:00
Paul Yang
bf32b36ab8
Merge pull request #5765 from BSBandme/integration
down integration from internal
2019-02-26 22:11:08 -08:00
Sydney Acksman
a4c3472ce8 Add some exceptions for MessageParser.ParseFrom (#5588)
* Fix #5513

* Added tests for invalid lengths when reading strings and bytes.
Added test for reading tags with invalid wire types in unknown field set.
Changed invalid length check in ReadString to match the one in ReadBytes
2019-02-26 15:31:29 -08:00
Yilun Chong
6d29c22a43 fix conformance test for text format 2019-02-26 13:46:30 -08:00
Yilun Chong
af8b91b828 fix csharp by regenerate descriptor 2019-02-26 13:07:59 -08:00
Yilun Chong
e4e5bc49d7
Fix failure test by regenerating descriptor and revert golden file (#5762) 2019-02-24 17:09:49 -08:00
Bo Yang
b52754b719 Update version to 3.7.0rc3 2019-02-22 11:31:48 -08:00
Xiang Dai
e479410564 delete all duplicate empty blanks (#5758)
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-20 19:28:50 -08:00
Paul Yang
c7b3392201
Update version to 3.7.0 (#5749)
* Update version to 3.7.0

* Update version number for java bom
2019-02-19 15:54:45 -08:00
Sydney Acksman
e7283254d6 Change MessageType != null in IsInitialized to FieldType == Message || Group (#5688) 2019-02-14 11:34:15 -08:00
Sydney Acksman
dbf77c65c4 Refactor how group endings are detected in generated C# code (#5686)
* Modify how end tags are encounted in merge code (compiler)

* Modify how end tags are encounted in merge code (generated)

* Modify how end tags are encounted in merge code (library)

* Regenerate generated code through generate_descriptor_proto.sh
2019-02-11 15:14:43 -08:00
Sydney Acksman
2a05691a53 Refactor how group endings are detected in generated C# code (#5686)
* Modify how end tags are encounted in merge code (compiler)

* Modify how end tags are encounted in merge code (generated)

* Modify how end tags are encounted in merge code (library)

* Regenerate generated code through generate_descriptor_proto.sh
2019-02-11 15:12:40 -08:00
Adam Cozzette
1ee15baefc Updated version to 3.7.0rc2 2019-01-30 21:08:04 -08:00
Hao Nguyen
d5be2baa46 Update version to 3.7.0 2019-01-24 10:23:02 -08:00
Yilun Chong
a2a0afb546
Down-integrate internal changes to github. (#5575)
* Down-integrate internal changes to github.

* Fix BUILD file and regenerate csharp descritpor
2019-01-13 17:40:58 -08:00
Yilun Chong
cb95a7f6a8
Down-integrate internal changes to github. (#5566)
* Down-integrate internal changes to github.

* fix csharp conformance test

* add comments in conformance.proto for text format

* fix comments

* fix comments, re-generated csharp file

* fix comments, re-generated csharp file
2019-01-11 11:40:52 -08:00
Thomas Van Lenten
b1b9eaa6c7 Comments on the next line will go to the next field.
Even though the comments were indented to appear to go with the jspb
case/field, protoc doesn't collect comments like that, so these "hanging"
comments actually "attach" to the next thing added to each.  Looking at
https://github.com/protocolbuffers/protobuf/pull/5566 you see where
the generated code picked up the comment on the wrong field.
2019-01-10 13:14:21 -05:00
Yilun Chong
0adb74c2d3 Down-integrate internal changes to github. (#5555)
* Down-integrate internal changes to github.

* fix python conformance test

* fix csharp conformance test

* add back java map_lite_test.proto's optimize for option

* fix php conformance test
2019-01-08 15:06:30 -08:00
Bo Yang
624a40a387 Down-integrate internal changes to github. 2018-12-20 14:21:20 -08:00
Paul Yang
cecba296b8
Down-integrate internal changes (#5467)
* Down-integrate internal changes

* Update generated code for php, objc and csharp.

* Add missing dependency in conformance_php
2018-12-14 16:05:03 -08:00
Hao Nguyen
4b02f652e0 Make sure to add a new line at the end of XML files 2018-12-14 15:10:11 -08:00
Hao Nguyen
9349e23827 Replace update_version shell script with a python script, which is much better at handling XML rewrite. Update the PHP version too. As part of rewrite, some XML file format will change a little, but the semantics is still the same so it should be okay. 2018-12-14 15:05:48 -08:00
Hao Nguyen
db0a9e0b96 Add <LangVersion>6</LangVersion> to the core protobuf C# project to prevent future incompatibility 2018-12-10 15:21:01 -08:00
Hao Nguyen
3d207c33a4 Fix TimestampPartial operator == overload implementation: Cannot call == inside it, otherwise it would cause stack overflow 2018-12-10 13:41:15 -08:00
Hao Nguyen
24638088c6 Make Protobuf compatible with C# 6 2018-12-10 10:22:41 -08:00
Jon Skeet
627cc48f5a Increase C# default recursion limit to 100 (#5339)
* Increase C# default recursion limit to 100

This matches the Java and C++ defaults.

* Change compatibility tests to use execution-time default recursion limit

This way the same tests should pass against all versions, even
if the recursion limit changes. (The tests will be testing whether
different messages work, admittedly - but that's probably fine.)
2018-11-13 10:21:30 -08:00
Adam Cozzette
86d4fe47df Updated checked-in generated code 2018-11-09 11:35:34 -08:00
Sydney Acksman
6f73c50936 C# Proto2 feature : Groups (#5183)
Add group support for proto2
2018-11-05 13:37:08 -08:00
Benjamin Krämer
80e530dabf Ported FieldMaskUtil from Java to C# (#5045)
* Ported FieldMaskUtil from Java to C#

* Merged FieldMaskUtil into FieldMaskPartial

- Removed FieldMaskUtil
- Moved FieldMaskTree to root
- Updated tests

* Improved tests

- Removed internal method FieldMaskTree.GetFieldPaths
- Proof FieldMask.Paths only contains expected values

* Added FieldMaskTreeTest to Makefile

* Added FieldMaskTree to Makefile
2018-10-08 12:54:05 -07:00