Commit Graph

6119 Commits

Author SHA1 Message Date
Roger Chen
7492b56812 Import versions from @bazel_skylib//lib:versions.bzl
@bazel_skylib//:lib is supposedly deprecated. The 'versions' struct in lib.bzl was committed to bazel-skylib at the same time as //lib:versions.bzl, so there should be no backward incompatibility.
2018-11-02 23:13:17 -07:00
Toby Hsieh
63d2f3bc80 Fix RepeatedField#first in Ruby gem (#5293)
Given an argument, the previous implementation was off by one
(`.first(2)` would return 3 elements) compared to the `Enumerable#first`
method.
2018-10-29 11:32:50 -07:00
Adam Cozzette
3025a06607
Merge pull request #5270 from Thomas-Barbier-1A/master
Fix error: unused parameter 'arena' [-Werror=unused-parameter]
2018-10-29 09:46:23 -07:00
micw523
0038ff49af Remove Debug Statement for Win/MinGW (#5283) 2018-10-23 12:50:57 -07:00
Paul Yang
acc0fc2a9e
Remove ruby21 and ruby22 tests (#5277)
* Remove ruby21 and ruby22 tests

* Update test badge
2018-10-22 15:09:36 -07:00
Adrián Nieto Rodríguez
31d6b4e30e Fix Javadoc typo (#5280) 2018-10-22 14:05:32 -07:00
Yilun Chong
565c26e7a1
Merge pull request #5186 from BSBandme/add_js_php_benchmark_to_dashboard
Add node and php to benchmark dashboard
2018-10-21 19:59:52 -07:00
Paul Yang
333b3ceab6
Add ruby 2.3, 2.4 and 2.5 test for linux. (#5256)
* Add ruby 2.3, 2.4 and 2.5 test for linux.

* Update kokoro files

* Add back commented gc test

* Fix gc_test failure

* Remove unused code

* Update ruby 2.5.0 to 2.5.1

* Update ruby 2.3 to 2.3.8

* Remove useless comment
2018-10-18 11:16:55 -07:00
Thomas BARBIER
403d216d5a Fix error: unused parameter 'arena' and 'default_value' [-Werror=unused-parameter] 2018-10-18 14:48:31 +02:00
Adam Cozzette
4e308267ac
Merge pull request #5260 from acozzette/common-h-includes
Removed unnecessary includes from stubs/common.h
2018-10-16 20:14:50 -07:00
Adam Cozzette
5e37bbf924 Removed unnecessary includes from stubs/common.h 2018-10-15 20:39:44 -07:00
Yilun Chong
5b8a023610 fix 2018-10-15 17:25:02 -07:00
Joshua Haberman
c7352b39f8
Merge pull request #5198 from hesmar/hemsar/cmakeFixProtobufGenerate
Revert "protobuf_generate(): add relative path to output dir"
2018-10-15 13:55:00 -07:00
Yilun Chong
dc81f795c7
Merge pull request #5247 from slovdahl/5139-fix-redundant-cast-java-warning
Remove unnecessary cast to Builder in generated Java code
2018-10-15 12:05:41 -07:00
Yilun Chong
ec11d29076 fix function names 2018-10-12 18:17:23 -07:00
Paul Yang
d2d4b403b5
Sync upb for unknown fix (#5240) 2018-10-12 13:46:26 -07:00
Paul Yang
39df66e1f7
Add ruby2.3,2.4.2.5 test on Mac and disable ruby2.1,2.2 test on Linux (#5250) 2018-10-12 12:36:33 -07:00
Adam Cozzette
ebd38c6d9a
Merge pull request #5227 from lopsided98/libatomic-fix
Link to libatomic when necessary (eg. on armv6l)
2018-10-11 16:16:58 -07:00
Sebastian Lövdahl
06bb8e7647 Remove unnecessary cast in generated Java code 2018-10-11 13:11:25 +03:00
Adam Cozzette
2009d45344
Merge pull request #5244 from KennethL/patch-1
Update third_party.md regarding Erlang
2018-10-10 10:12:10 -07:00
Kenneth Lundin
6d2b3c43bf
Update third_party.md regarding Erlang
Removing links to Erlang projects which are no longer maintained.
2018-10-10 16:33:24 +02:00
Adam Cozzette
154b39c23e
Merge pull request #5214 from elharo/parent
remove obsolete parent
2018-10-08 13:41:51 -07:00
Ben Wolsieffer
56b40a8f05 Link to libatomic when necessary (eg. on armv6l) 2018-10-08 16:27:17 -04:00
Paul Yang
a0da84bff4
Fix broken ruby test (#5235)
* Replace assert_true/assert_false with assert, because they are not provided in newer version of test/unit

* Use rescue to handle exception subclass

* Commented out the require that caused gc_test failure.

* Commented out test

* Fix typo
2018-10-08 13:16:56 -07: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
michaelbausor
6a51c03823 PHP: Add support for primitive types in setters (#5126)
* Add support for primitive types in setters

* Update to address PR feedback

* Add tests and fixes for repeated fields

* Remove repeated field code, add getters

* Cleanup, test getters and oneofs

* Move boxing logic into separate class

* Add tests for wrapper type constructor args

* Update to add new setXXXValue methods

* Fix tests for invalid values

* Fix c extension for wrapper accessors

* Fix the bug that well known types didn't call Message_construct

* Address PR comments

* Refactoring init message with array logic

* Add include path to protoc

* Add missing TSRM_LS defintion

* Fix TSRM_LS

* Fix dist check
2018-10-07 16:56:41 -07:00
Leon Barrett
9e69594adf Fix parsing empty Struct Values from Json (#5211)
* Fix parsing empty Struct Values from Json

This fixes a bug. When parsing a struct from JSON like
    struct = json_format.Parse('{"k": {}}', Struct())
then the struct's "k" value would end up not initialized, and accessing
the value would raise an error.
    In[1]: struct['k']
    ValueError: Value not set
That seems to be because the Struct field of the Value was not set.
    In[2]: struct
    Out[2]:
    fields {
      key: "k"
      value {
      }
    }

This commit makes sure that the Value's Struct field is initialized even
if the Struct has no values itself.

This commit also extends a test to cover this case.

* Additionally test for empty list
2018-10-05 16:38:16 -07:00
Josh Kelley
8d6f8df1ec ParseFromString returns bytes parsed (#5166)
* ParseFromString returns bytes parsed

ParseFromString is documented as returning the number of bytes parsed,
and the C++ implementation does this, so the Python implementation
should too.

See #5165.

* Fix docstring

* Add a test for ParseFromString length behavior
2018-10-05 11:07:55 -07:00
Sydney Acksman
3f826a6dbf Add method for Any.Is (#5207) 2018-10-05 11:06:58 -07:00
Sydney Acksman
2b0a18b270 Add C# compiler option to add System.SerializableAttribute to generated message classes (#5208) 2018-10-05 11:06:02 -07:00
Kevin James
f50a1f843e fix(python): fix deprecated collections.abc usage (#5195)
Many classes within collections were moved to collections.abc in Python
3.3 -- their usage as imported directly from collections is now
deprecated as of Python 3.7 and will be removed soon.

The fallback import added in this PR can be removed entirely when
support for versions of Python prior to 3.3 is dropped.
2018-10-04 16:06:53 -07:00
Paul Yang
011f67035c
Fix broken tests by #4816 (#5221)
* Fix dist check for ruby

* Fix dist check
2018-10-04 10:29:21 -07:00
Adam Cozzette
b20bc69625
Merge pull request #5218 from cliffburdick/master
Fixed unsigned warning
2018-10-04 10:13:54 -07:00
cburdick
ad47ec5060 Used C++ style casts 2018-10-03 20:11:45 +00:00
Adam Cozzette
c27d6a5646
Merge pull request #5212 from GregTho/win32close
Use ::_close rather than ::close in Win32 stubs.
2018-10-02 15:43:17 -07:00
Cliff Burdick
ccacd40c32 Fixed unsigned warning 2018-10-02 21:00:25 +00:00
Thomas Van Lenten
8c1748f1cd Add tests to confirm strings/bytes are copied. 2018-10-02 13:45:18 -04:00
Thomas Van Lenten
09c001e999 Copy the value when setting message/data fields.
Follow ObjC conventions and how the generated header labels things by
copying NSStrings/NSData fields when setting them.
2018-10-02 13:45:18 -04:00
Thomas Van Lenten
97d03abb85 Turn off ALWAYS_SEARCH_USER_PATHS.
Causes a warning in newer Xcodes.
2018-10-02 13:45:18 -04:00
Thomas Van Lenten
561413523f Remove stray 'return'. 2018-10-02 13:45:18 -04:00
Elliotte Harold
feea49b5b5 remove obsolete parent 2018-10-02 07:11:47 -04:00
GregTho
703f11123a
Use ::_close rather than ::close in Win32 stubs.
The former is the proper converse of _open, which is used in
::google::protobuf::internal::win32::open. This resolves issue #5209.
2018-10-02 12:16:14 +02:00
Adam Cozzette
4265a1d36c
Merge pull request #5210 from jstandish/patch-1
Added VSCode extension link
2018-10-01 13:52:45 -07:00
John Standish
bac4c8ec56
Update third_party.md
Added link to VSCode-Proto3 extension in Other Utilities section
2018-10-01 12:41:19 -07:00
Nazarbek Altybay
887f5e5f39 Fixed typo (#5206) 2018-09-30 20:59:54 -07:00
Markus Heß
1509e8e3b3 Revert "protobuf_generate(): add relative path to output dir"
This reverts commit 93f6b67eb2.

Protoc adds already the relative path to the output directory.
Therefore, we have to remove this again from the output directory
to prevent adding it twice.
2018-09-28 11:00:55 +02:00
Joshua Haberman
19ef4ab1c2
Merge pull request #4816 from hrsht/hrsht/zanker-proto2
Basic Proto2 support for Ruby gem
2018-09-27 15:23:10 -07:00
Harshit Chopra
d0535cc09e Adds support for proto2 syntax for Ruby gem.
This change only adds basic proto2 support without advanced features
like extensions, custom options, maps, etc.

The protoc binary now generates ruby code for proto2 syntax.
However, for now, it is restricted to proto2 files without advanced features
like extensions, in which case it still errors out.

This change also modifies the DSL to add proto messages to the DescriptorPool.
There is a new DSL Builder#add_file to create a new FileDescriptor. With this,
the generated ruby DSL looks something like:

Google::Protobuf::DescriptorPool.generated_pool.build do
  add_file "test.proto" do
    add_message "foo" do
      optional :val, :int32, 1
    end
  end
end
2018-09-27 14:21:16 -04:00
Yilun Chong
dfa53e2fa2 fix comment out 2018-09-26 10:39:13 -07:00
Yilun Chong
cee0447fd9 Add node and php to benchmark dashboard 2018-09-25 16:05:16 -07:00