Commit Graph

333 Commits

Author SHA1 Message Date
Joshua Haberman
d90f3b8b17 Fixed build failure in conformance tests. 2020-09-28 14:40:09 -07:00
Joshua Haberman
38d6de1eef Sync from Piper @334206209
PROTOBUF_SYNC_PIPER
2020-09-28 11:54:54 -07:00
Joshua Haberman
59d3966b1f Updated failure list for the PHP C implementation. 2020-08-17 17:55:16 -07:00
Joshua Haberman
492d0b543e Added new failing conformance tests to failure list. 2020-08-17 17:15:34 -07:00
Joshua Haberman
32a94ce353 Merge tag 'refs/tags/sync-piper' into sync-stage
# Conflicts:
#	csharp/src/Google.Protobuf.Test/testprotos.pb
2020-08-17 15:26:33 -07:00
Joshua Haberman
95e6c5b474 Sync from Piper @327110949
PROTOBUF_SYNC_PIPER
2020-08-17 15:26:13 -07:00
Adam Cozzette
58f4260e8e Merged 3.13.x into master 2020-08-17 11:06:11 -07:00
Peter Newman
e2cc2de304
Fix lots of spelling errors (#7751)
* Fix a typo

* Fix lots of spelling errors

* Fix a few more spelling mistakes

* s/parsable/parseable/

* Don't touch the third party files

* Cloneable is the preferred C# term

* Copyable is the preferred C++ term

* Revert "s/parsable/parseable/"

This reverts commit 534ecf7675.

* Revert unparseable->unparsable corrections
2020-08-10 11:08:25 -07:00
Paul Yang
69c4bc5674 Updated upb to pick up several bugfixes (#7740)
* Updated upb to pick up several bugfixes. This fixes most conformance failures.

* Updated golden file, now that we are serializing as packed by default.

* Set "packed" properly: it is on by default for packable fields in proto3.

* Updated failure list for PHP now that we properly respect "packed".

* Temporarily disable encode_decode_test

Co-authored-by: Joshua Haberman <jhaberman@gmail.com>
2020-08-07 14:44:49 -07:00
Joshua Haberman
6ba52411d0 Sync from Piper @320514613
PROTOBUF_SYNC_PIPER
2020-07-09 18:17:47 -07:00
Joshua Haberman
ffb2b53834
Remove old PHP extension (#7695)
* Removed references to legacy class names from generated code.

* Removed old PHP extension in favor of new extension. This drops PHP5 compat.

* Updated failure lists for things fixed by the new extension.

* Updated Makefile.am for new file list.

* Fix distcheck.
2020-07-09 11:06:24 -07:00
Joshua Haberman
dfab275eca Sync from Piper @317197168
PROTOBUF_SYNC_PIPER
2020-06-18 15:47:49 -07:00
Joshua Haberman
f77065d4eb Sync from Piper @316511779
PROTOBUF_SYNC_PIPER
2020-06-15 11:48:47 -07:00
Joshua Haberman
183cdec7cd Sync from Piper @314226556
PROTOBUF_SYNC_PIPER
2020-06-01 16:32:31 -07:00
Joshua Haberman
6ed738305b Sync from Piper @311396324
PROTOBUF_SYNC_PIPER
2020-05-13 13:46:15 -07:00
Joshua Haberman
6b5fb807c0 Sync from Piper @310858019
PROTOBUF_SYNC_PIPER
2020-05-11 00:12:20 -07:00
Joshua Haberman
2d80a70048 Sync from Piper @310457838
PROTOBUF_SYNC_PIPER
2020-05-07 16:21:50 -07:00
Joshua Haberman
32e5deb1ac Sync from Piper @308829107
PROTOBUF_SYNC_PIPER
2020-04-28 08:40:38 -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
b99994d994 Sync from Piper @304070343
PROTOBUF_SYNC_PIPER
2020-03-31 16:25:37 -07:00
Joshua Haberman
f2c5ee5117
Fix for JSON serialization of 0/empty-valued wrapper types (#7198)
* Fixed Ruby JSON serialization of 0/empty wrapper fields.

* Removed newly-passing conformance tests from the failure list.
2020-02-11 13:18:32 -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
Paul Yang
a66423f0fd
Make c extension portable for php 7.4 (#6968)
* Make c extension portable for php 7.4

* Fix conformance tests

* Fix comments

* Fix 32-bit

* Update conformance failure list

* Fix compiler warnings

* Cleanup configure created by phpize
The file created in php 7.4 is not recognizable by previous versions

* Fix conformance tests for 64-bit php

* Fix conformance test

* Fix compile warning

* Fix compile warnings
2019-12-09 17:02:10 -08:00
Sydney Acksman
e2e70a8a42 Fix conformance test failures for Google.Protobuf 2019-11-19 17:50:46 -06:00
Rafi Kamal
9b0fa3e7fb Remove java/lite/proguard.pgcfg from EXTRA_DIST since it's not part of
protoc.
2019-11-12 13:38:58 -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
8edd68ea75 Add proguard.pgcfg to EXTRA_DIST in Makefile.am 2019-11-12 13:38:58 -08:00
Rafi Kamal
58d4420e2d Down Integrate Internal Changes 2019-11-12 13:38:58 -08:00
Rafi Kamal
5e6d57bd8c Merge branch '201910111201' of https://github.com/rafi-kamal/protobuf into 201910111201 2019-10-23 17:46:09 -07:00
Rafi Kamal
80734b2e1a Reverted changes in conformance/failure_list_js.txt 2019-10-23 17:45:23 -07:00
Rafi Kamal
27c1defe35
Merge branch 'master' into 201910111201 2019-10-11 12:07:38 -07:00
Rafi Kamal
6c92f9dff1 Down integrate to GitHub 2019-10-11 12:05:46 -07:00
Rafi Kamal
d8e678aae4
Merge pull request #6728 from protocolbuffers/3.10.x-merge
Merge 3.10.x with master and increment the version number
2019-10-10 16:56:19 -07:00
Paul Yang
2dec82e1e0
Fix conformance test (#6750)
* Fix conformance test

Default value of string/message map is not encoded

* Fix zts build
2019-10-10 16:03:52 -07:00
Rafi Kamal
97c7c3fc97 Merge 3.10.x to master 2019-10-03 14:03:38 -07:00
Paul Yang
3f323c5b99
Fix incorrect leap day for Timestamp in php (#6696) 2019-09-24 18:26:02 -07:00
Paul Yang
7114d73dea
Implement binary conformance test for oneof fields (#6622)
* Implement binary conformance test for oneof fields

* Update failure list

* Update failure list for php c extension
2019-09-09 13:31:53 -07:00
Paul Yang
ce942bcae1
Add binary conformance tests for map fields (#6560)
* Add binary conformance tests for map fields

* Update failure list

* Fix php conformance test

* Fix php conformance test

In 32-bit platform, int64 should be string. However, map iterator returns string key as integer.

* Add more test cases for map

* Update failure list
2019-09-03 10:47:32 -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
Thomas Van Lenten
b273cba192 Fix enum writing.
Enums use varint, so if the value is negative it should end up being longer.

This was caught my new conformance test cases.
2019-08-26 17:17:32 -04:00
Paul Yang
6c9d7ecfa4
Test singular fields are encoded in canonical way (#6553)
* Test singular fields are encoded in canonical way

* Defautl values in proto3 should not be encoded.
* Values should be converted to the canonical representation (e.g.,
long int64 value may be truncated for int32 field)

* Update failure list

* Update failure list
2019-08-23 12:20:19 -07:00
Rafi Kamal
4f02f056b5 Down integrate to GitHub 2019-08-22 17:33:01 -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
Paul Yang
d79d368ff1
Remove stale comment (#6552)
Proto2 has been tested for invalid cases. Check implementation of
ExpectParseFailureForProto (https://github.com/protocolbuffers/protobuf/blob/master/conformance/binary_json_conformance_suite.cc#L322)
2019-08-22 13:25:19 -07:00
Paul Yang
6b3024f693
Accept string for int64 wrappers (#6491) 2019-08-19 17:16:58 -07:00
Paul Yang
0c4b607e98
Conformance packed (#6447)
* Add conformance tests for explicit packed/unpacked fields

* Fix typo

* Update failure lists

* Update failure list

* Use enum class to make enum scoped
2019-08-02 14:35:44 -07:00
Paul Yang
a9bb65643b
Add binary conformance test for default repeated fields (#6440)
* Add binary conformance test for default repeated fields

1) Both packed and unpacked encoding should be accepted for parsing.
2) Encode should follow the default way for the syntax.

* Uncomment test

* Remove is_primitive

* Add failed tests to failure lists.

* Add failed test to failure list

* Use binary format to specify expected value

Text format cannot distinguish whether repeated field is packed or not.

* Change method name from ToHexString to ToOctString

* Add failed test to failure list

* Add failed test to php's failure list

* Fix comments
2019-07-26 10:05:14 -07:00
Paul Yang
2849a79990
Add binary conformance test for message type. (#6435)
* Add binary conformance test for message type.

* Add test case for merge repeated scalar message field

* Add failed tests to failure list

* Add failed test to php's failure list

* Remove successful tests from php c's failure list
2019-07-24 12:26:40 -07:00
Paul Yang
455440fc47
Add binary conformance test for enum fields. (#6434)
* Add binary conformance test for enum fields.

* Add failed conformance test to js failure list
2019-07-23 15:07:26 -07:00
Paul Yang
29e4fadbfb
Add binary conformance test case for bytes field (#6428)
* Add binary conformance test case for bytes field

* Add failed conformance test to php's failure list
2019-07-23 12:42:30 -07:00
Paul Yang
eef87dd138
Add conformance test for binary string (#6415)
* Add conformance test for binary string

* Add failing tests to php failure list
2019-07-22 16:52:31 -07:00
Thomas Van Lenten
400d3888b9 Revert bad change to objc conformance test in #6199
Since true for objc is external, changes should always start on the github
side, so the fact that something got pushed out is a sign something was
broken in the process.
2019-07-19 10:14:53 -04:00
Hao Nguyen
51026d9229 Down integrate to GitHub 2019-06-26 11:01:34 -07:00
Bo Yang
bc742640ef Merge remote-tracking branch 'origin/3.8.x' 2019-06-21 04:01:45 +00:00
Leonard Hecker
43307d4da0 php: Fix formatting of Duration (#6155)
* php: Fixed php notices for unknown enum indices

* php: Fixed formatting of Duration

This fixes:
* Missing nanoseconds. The nanoseconds where divided as a float and
  implicitly converted to a string before being passed to bcadd.
  This can result in a float formatted in scientific/exponential notation,
  which bcmath doesn't understand.
* Durations are supposed to be formatted without trailing zeroes.
2019-06-18 10:31:50 -07:00
Paul Yang
640423f157
Change int64 json encoding to be string for php and ruby (#6251)
* Change int64 json encoding to be string for php and ruby

* Fix ruby test

* Sync upb change
2019-06-17 13:14:27 -07:00
Paul Yang
abb4fb0040
Change offset of Timestamp conformance test to distinguish from the default (#6263)
Fixes #4079
2019-06-17 13:13:54 -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
044c766fd4 Down integrate to GitHub 2019-05-30 13:31:15 -07:00
Thomas Van Lenten
beaeaeda34 Use runtime_error vs just exiting for some issues.
release notes: no
2019-05-29 15:58:09 -04:00
Paul Yang
7597f8ad24
Custom mktime to fix issue on mac (#6118)
* Custom mktime to fix issue on mac

* Remove succeeded tests from failure list
2019-05-09 20:51:35 -07:00
Hao Nguyen
6b4b9869ec
Add a new conformance test for top level JSON null (#5966)
* Add a new conformance test for top level JSON null
2019-04-24 15:29:17 -07:00
Hao Nguyen
ef1e8e7172 Add module for JavaLite and fix builds 2019-04-09 06:48:01 -07:00
Hao Nguyen
6dc9832aab Merge branch 'master' of https://github.com/protocolbuffers/protobuf into sync201904090622 2019-04-09 06:25:48 -07:00
Hao Nguyen
176f7db11d Down integrate to Github 2019-04-09 06:23:32 -07:00
Hao Nguyen
c163a2d1a4 Revert accidentally commit 2019-04-05 17:09:42 -07:00
Hao Nguyen
1eb049141e Add module for JavaLite and fix builds 2019-04-05 16:55:34 -07:00
Hao Nguyen
86bc27d220 Merge branch 'master' of https://github.com/protocolbuffers/protobuf 2019-04-05 16:41:24 -07:00
Hao Nguyen
a48a574f7e Down integrate to Github 2019-04-05 16:39:18 -07:00
Bo Yang
2d9507ec74 Update upb for ruby 2019-03-28 02:17:39 +00:00
Adam Cozzette
8645d893ab Merge branch '3.7.x' into merge-3-7-x 2019-03-26 14:32:20 -07:00
Hao Nguyen
1a3fa5d9eb Update conformance test failures 2019-03-20 14:43:42 -07:00
Hao Nguyen
81567d89a9 Merge branch 'contributing' of https://github.com/haon4/protobuf into contributing 2019-03-20 11:46:11 -07:00
Hao Nguyen
2f864fdfdf Down integrate to Github 2019-03-20 11:45:01 -07:00
Paul Yang
57b6597f46
Replace strptime with custom implementation (#5906)
* Replace strptime with custom implementation

* Fix ruby strptime

* Fix test

* Fix ruby conformance test

* Use mktime

* Remove EmptyFieldMask from failed conformance test list
2019-03-19 22:27:13 -07: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
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
Paul Yang
a18680890b
Encode empty ListValue (#5857)
* Encode empty ListValue

* Update mac ruby conformance failure list
2019-03-10 17:33:46 -07:00
Paul Yang
e75a689f7c
Fix ruby continuous tests (#5853)
* Fix ruby continuous tests

* Fix compatibility test
2019-03-07 17:16:31 -08:00
Hao Nguyen
d0f91c863a
Down integrate to Github (#5839)
* Down integrate to github
2019-03-06 12:39:12 -08:00
Bo Yang
cb6fa92ee8 Merge branch '3.7.x' 2019-03-04 10:18:18 -08:00
Yilun Chong
6d29c22a43 fix conformance test for text format 2019-02-26 13:46:30 -08:00
Yilun Chong
429d2ae19f
Merge branch 'master' into integration 2019-02-24 17:17:17 -08:00
Yilun Chong
d8c2501b43 down integration from internal 2019-02-22 18:13:33 +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
Bo Yang
96029f3c4a Convert integer to string if field is string field in json
json_decode automatically convert numeric string to integer, so that
we need to convert it back. However, this will suceed to parse invalid
json data with string field set as integer even though it should have failed.
Because, the failure case is less often than the succeeding case, we decided
to make this change. Users should make sure their data don't use integer for
string fields by themselves.
2019-01-28 20:57:51 +00:00
Paul Yang
3cae8e4467 Default values should also be serialized for json map key/value (#5643) 2019-01-28 19:30:10 +00:00
Paul Yang
a21caa237a
Default values should also be serialized for json map key/value (#5643) 2019-01-28 11:25:52 -08:00
Paul Yang
7f42d6d0bc
Fix empty FieldMask json encoding/decoding (#5605)
* Fix empty FieldMask json encoding/decoding

* Add failed test to python's conformance failure list
2019-01-22 15:35:12 -08:00
Paul Yang
37a0ab7d83
Fix Any json encoding/decoding for ruby. (#5592)
* Fix Any json encoding/decoding for ruby.

* Revert unnecessary changes
2019-01-17 10:24:41 -08:00
Paul Yang
c4f2a92c55
Fix field mask for php in json (#5591)
* Fix field mask for php in json

* Update byte size
2019-01-17 10:18:43 -08:00
Thomas Van Lenten
0c95791509 [ObjC] add support for the TextFormat constants.
ObjC doesn't support them, but this ensure when tests are added
they will be handled correctly.

The conformance.proto was updated in PR #5566
2019-01-14 11:03:16 -05: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
Paul Yang
aa5c12e882
Revert "Revert "Enable the ignore_unknown_field option in the Ruby unmarshal options" (#5511)" (#5533)
* Revert "Revert "Enable the ignore_unknown_field option in the Ruby unmarshal options" (#5511)"

This reverts commit be1716a6d0.

* Separate ruby conformance test on Mac

* Fix shell syntax

* Fix test
2019-01-08 10:53:34 -08:00