Commit Graph

350 Commits

Author SHA1 Message Date
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
39492b68d8
Update protobuf version to 3.11.2 (#7004) 2019-12-10 17:50:28 -08:00
Rafi Kamal
b78c53f935
Update protobuf version to 3.11.1 (#6972) 2019-12-02 11:57:21 -08:00
Rafi Kamal
1d5375c621
Update protobuf version to 3.11.0 (#6943) 2019-11-25 15:12:00 -08:00
Rafi Kamal
6220db4ec4
Update protobuf version (#6927) 2019-11-21 19:10:04 -08:00
Rafi Kamal
cd7b27be38 Update protobuf version (#6898) 2019-11-19 15:32:13 -08:00
Rafi Kamal
3cc55d6167
Update protobuf version (#6898) 2019-11-15 17:44:10 -08:00
Joshua Haberman
781d6963c6 Fixed the case of multi-line strings in JSON. 2019-10-31 12:23:25 -07:00
Joshua Haberman
5f25400250 Fixed conformance test regression: empty string wrapper. 2019-10-29 18:16:04 -07:00
Joshua Haberman
aae5c491f7 Merge branch 'master' into ruby-lazy-wrappers 2019-10-29 17:53:35 -07:00
Joshua Haberman
e8c67e14ac Fixed the oneof case for lazy wrappers. 2019-10-29 15:44:51 -07:00
Joshua Haberman
8393d4833f Nearly all known cases (map, repeated field, and top-level) have been addressed.
The only case that doesn't work is decoding a wrapper type from JSON
at the top level.  This doesn't make sense and probably no users do it
I changed it to throw.
2019-10-29 13:30:12 -07:00
Joshua Haberman
bd253f0130 Fixed equality, and extended to repeated fields and maps. 2019-10-28 18:03:25 -07:00
Joshua Haberman
9cfb12bf0a Tests pass for all common operations.
A few things that don't work or aren't tested yet:
- wrappers at the top level
- equality checking for not-yet-expanded wrappers.
2019-10-21 09:19:19 -07:00
Joshua Haberman
969d245bd3 WIP: first steps towards lazily creating wrappers. 2019-10-21 07:27:36 -07:00
Joshua Haberman
77646a45e2
Merge pull request #6758 from XrXr/ub
Remove unused argument to avoid UB
2019-10-15 23:41:29 -07:00
Rafi Kamal
bf36d04348
Merge pull request #6757 from haberman/ruby-empty-names-release
Ported names fix for Ruby to the release branch.
2019-10-13 22:24:38 -07:00
Alan Wu
c1ba7c643c Remove unused argument to avoid UB
`OneOfDescriptor_each` is registered as a Ruby method which takes zero
parameters, which means it should take one argument.

When Ruby invokes `OneOfDescriptor_each`, it calls it with one parameter
only, which is one less than what `OneOfDescriptor_each` takes before
this commit. Calling a function with the wrong number of argument is
technically undefined behavior.

See also: §6.5.2.2, N1256
2019-10-11 20:32:35 -04:00
Joshua Haberman
35da84bf64 Ported names fix for Ruby to the release branch. 2019-10-11 14:52:08 -07: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
Joshua Haberman
61b6670a2a Fixed leap year handling by reworking upb_mktime() -> upb_timegm(). (#6695)
The new function name also better reflects the semantics of the
function.  Like timegm(), this function always converts to/from
UTC, not local time.
2019-09-24 17:10:24 -07: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
Rafi Kamal
4e07b6347d
Merge pull request #6618 from TeBoring/3.10.x-cherrypick
Cherry Pick (#6614)
2019-09-05 09:53:25 -07:00
Rafi Kamal
56bf637221 Update protobuf version 2019-09-05 09:47:52 -07:00
Paul Yang
398d37f95f Sync upb (#6614)
* Sync upb

https://github.com/protocolbuffers/upb/pull/209

* Update upb

https://github.com/protocolbuffers/upb/pull/210
2019-09-05 09:10:01 -07:00
Paul Yang
7f520092d9
Sync upb (#6614)
* Sync upb

https://github.com/protocolbuffers/upb/pull/209

* Update upb

https://github.com/protocolbuffers/upb/pull/210
2019-09-04 14:41:27 -07:00
Joshua Haberman
d2d49bf56a
Merge pull request #6547 from haberman/layout_clear
Optimization for layout_init()
2019-08-28 15:08:30 -07:00
Joshua Haberman
671c2459fc Fixed crash bug and moved initialization into init method. 2019-08-28 13:15:07 -07:00
Paul Yang
659e799fb8
Sync upb (#6577)
* Sync upb

* https://github.com/protocolbuffers/upb/pull/208

* Fix php c extension compiling

Don't use macros defined by upb

* Update ruby conformance failure list
2019-08-27 13:14:57 -07:00
Paul Yang
893a7d31e1
No need to have a separate ruby conformance test on Mac (#6555)
The previous issue of mktime doesn't work on Mac has been fixed.
2019-08-22 16:17:37 -07:00
Joshua Haberman
780b050975 Fix for GC of Ruby map frames. (#6533)
We were creating a map decoding frame when starting the *map*,
but clearing the GC slot when finishing each *map entry*.  This
means that the decoding frame could be collected in the meantime.
2019-08-22 14:36:27 -07:00
Julio Monteiro
8c3a2ce198 Add source code URI to the Ruby gemspec file (#6466)
* Add source code URI to the Ruby gemspec file

As a developer, I would like to easily find the source code origin for this gem when browsing through https://rubygems.org/gems/google-protobuf.
In order to solve this, I've followed instructions at https://guides.rubygems.org/specification-reference/#metadata by adding the source_code_uri metadata key pair.

* Use git tag instead of fixed "master" string

* Substitute the string, not the Gem::Version
2019-08-22 14:32:06 -07:00
Joshua Haberman
3e3407af49 Re-add memset() that seemed redundant but is necessary in case of GC. 2019-08-21 18:39:25 -07:00
Joshua Haberman
b9131f0aab Removed commented-out code. 2019-08-21 18:05:20 -07:00
Joshua Haberman
cf07d3c1b2 layout_init() optimization works! 2019-08-21 17:58:37 -07:00
Joshua Haberman
78378dab22 Merge branch 'master' into layout_clear 2019-08-20 17:24:18 -07:00
Joshua Haberman
63e4a3ecc9
Merge pull request #6541 from haberman/ruby_race_fix
Fix for race in lazy initialization of handlers.
2019-08-20 15:17:14 -07:00
Joshua Haberman
b245551a61 Fix for race in lazy initialization of handlers.
This fixes https://github.com/protocolbuffers/protobuf/issues/6532.
2019-08-20 14:08:31 -07:00
Joshua Haberman
c02a6fbf2c Bugfix for GC mark of oneof fields. 2019-08-16 09:37:36 -07:00
Joshua Haberman
1c9fb9d45b WIP. 2019-08-16 06:42:13 -07:00
Joshua Haberman
013a0ea882 Optimized layout_mark to not iterate over the msgdef. 2019-08-15 06:39:38 -07:00
Joshua Haberman
0088a75ce5 Merge branch 'master' into layout_mark 2019-08-15 05:36:24 -07:00
Joshua Haberman
0f76f8a83b Put oneof case offset in separate oneof table. 2019-08-15 03:37:06 -07:00
Joshua Haberman
63f324a993 Roll forward Ruby upb changes now that protobuf Ruby build is fixed (#5866)
* Rolled forward again with "Updated upb from defcleanup branch..."

Revert "Revert "Updated upb from defcleanup branch and modified Ruby to use it (#5539)" (#5848)"

This reverts commit 1568deab40.

* A few more merge fixes.

* Updated for defcleanup2 branch.

* Fixed upb to define upb_decode().

* Fixed names of nested messages.

* Revert submodule.

* Set -std=gnu90 and fixed warnings/errors.

Some of our Kokoro tests seem to run with this level of warnings,
and the source strives to be gnu90 compatible.  Enforcing it for
every build removes the possibility of some errors showing up in
Kokoro/Travis tests only.

* Fixed remaining warnings with gnu90 mode.

I tried to match warning flags with what Ruby appears to do
in our Kokoro tests.

* Initialize values registered by rb_gc_register_address().

* Fixed subtle GC bug.

We need to initialize this marked value before creating the instance.

* Truly fix the GC bug.

* Updated upb for mktime() fix.

* Removed XOPEN_SOURCE as we are not using strptime().

* Removed fixed tests from the conformance failure list for Ruby.

* Fixed memory error related to oneof def names.

* Picked up new upb changes re: JSON printing.

* Uncomment concurrent decoding test.
2019-08-14 14:41:37 -07:00
Joshua Haberman
1e37a94bb5 Optimized away the creation of empty string objects.
Prior to this CL, creating an empty message object would create
two empty string objects for every declared field.  First we
created a unique string object for the field's default.  Then
we created yet another string object when we assigned the
default value into the message: we called #encode to ensure
that the string would have the correct encoding and be frozen.

I optimized these unnecessary objects away with two fixes:

1. Memoize the empty string so that we don't create a new empty
   string for every field's default.
2. If we are assigning a string to a message object, avoid creating
   a new string if the assigned string has the correct encoding and
   is already frozen.
2019-08-13 04:54:11 -07: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