Commit Graph

205 Commits

Author SHA1 Message Date
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
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
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
Thomas Van Lenten
24d344c30c [ObjC] Add the jspb cases to the switches so they are complete. 2019-01-07 17:38:20 -05:00
Paul Yang
be1716a6d0
Revert "Enable the ignore_unknown_field option in the Ruby unmarshal options" (#5511) 2018-12-26 12:26:24 -08:00
Paul Yang
8faa778add
Fix Any json encoding/decoding in php (#5496)
* Fix Any json encoding/decoding in php

* Fix comments
2018-12-26 10:36:09 -08:00
Joshua Haberman
21940734be
Merge pull request #5373 from ebenoist/erik/unknown-fields
Enable the ignore_unknown_field option in the Ruby unmarshal options
2018-12-22 10:10:40 -08:00
Erik Benoist
9ac11326df Adds the ability to ignore unknown fields on parse
This adds the ability for the MRI Ruby library to optionally pass in a
ignore_unknown_fields option when decoding JSON. The functionality was
added upstream in upb, this change exposes that option.
2018-12-21 16:06:21 -06:00
Hao Nguyen
e24d9a8aba Add dependency to AliasedEnum in PHP 2018-12-19 15:48:57 -08:00
Hao Nguyen
37dbfd6c46 Do not require ruby enum to be uppercase 2018-12-14 17:06:11 -08:00
Hao Nguyen
00b9b2303c Add conformance test for enum alias with same name but different case 2018-12-14 16:48:06 -08:00
Hao Nguyen
a6d624ba44 Merge branch 'master' of https://github.com/haon4/protobuf 2018-12-14 16:41:49 -08:00
Hao Nguyen
3d46d8dfe4 Add conformance test for enum alias of the same name with different case 2018-12-14 16:41:44 -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
Paul Yang
9bda1f19bf
Adopt upb change for timestamp and duration json to php (#5106)
* Adopt upb change for timestamp and duration json to php

* Remove unused code

* Re-sync upb

* Fix php implementation timestamp json parsing

* Fix strptime use local timezone on mac.

* Remove succeeding tests

* Resync

* Add tests for values

* Fix php tests

* Fix encoder handlers change default value

Previously, oneofsubmsg_handler and submsg_handler change zval's default value directly.
The fix use REPLACE_ZVAL_VALUE which create a copy of parsed value and assign it to zval.
2018-09-22 18:57:43 -07:00
Paul Yang
5aeee3dc91
Add source dependency of test suite implementation to main function (#5069)
* Fix conformance running nothing issue

This change adds a source dependency of the test suite implementaion
class in the main function. For generality reason, the main function is
moved to the file of the test suite implemetation.  New test suite
implementation will need to implement the main function.
In order to make it easy for test suite implementation to implement the
main function, this change also refactor out the common code out of the
main function.

* Fix typo
2018-09-06 15:02:04 -07:00
Paul Yang
98e26a4195
Add missing reference to conformanc_test_impl.cc in Makefile (#5100)
* Add missing reference to conformanc_test_impl.cc in Makefile

* Update conformance failure list
2018-08-31 10:47:58 -07:00
Feng Xiao
afe98de32a Replace repo links. 2018-08-22 11:55:30 -07:00
Joshua Haberman
585b24e9a6
Merge pull request #5032 from TeBoring/json-wrapper
Fix json parsing of wrapper values
2018-08-13 13:36:08 -07:00
Bo Yang
e3ee7167f1 Fix json parsing of wrapper values 2018-08-10 18:09:02 +00:00
Feng Xiao
acd5b05e9f Fix failing tests.
1. Fix C++ tests.
  * Add missing files to Makefile.am and fix distcheck in tests.sh
  * Remove BUILT_SOURCES from conformance/Makefile.am.
  * Add some missing override keyword.
  * Add a type cast to int64 because our StrCat() in stubs can't handle size_t.
2. Fix Java tests.
  * Add missing test dependency on guava in pom.xml.
  * Include newly referenced test data in test resources.
  * Manually fix map_lite_test.proto which is overwritten because it's mapped
    from map_test.proto in google3.
  * Add back "optimize_for = LITE_RUNTIME" which is still needed to keep the
    opensource test passing as it's still running lite tests.
  * Add a type cast in newBuilder() because without it the code doesn't compile
    with openjdk javac 1.8 (the compiler can't figure if it's the right type
    due to complex generic typing).
3. Fix Python tests.
  * Remove/replace references to <hash_map>.
  * Suppress more warnings in setup.py.
  * Replace incorrect header inclusion for google/protobuf/proto_api.h.
  * Add strings::EndsWith to google/protobuf/stubs/strutil.h because it's
    referenced in the updated python C extension code.
  * Replace proto2 with google::protobuf. The proto2 name is leaked to
    opensource because we removed the subsitition rule for proto2 namespace
    but only fixed C++ source code and forgot to update python C extension code.
2018-08-09 21:21:01 -07:00
Feng Xiao
a8465b738e Merge master branch. 2018-08-08 17:14:42 -07:00
Feng Xiao
6bbe197e9c Down-integrate from google3. 2018-08-08 17:00:41 -07:00
Paul Yang
8705adc228
Give a specific category to each test. (#4965)
* Give a unique category to each test.

This change introduce a TestCategory enum to ConformanceRequest. Existing tests
are divided into three categories: binary format test, json format test and json
format (ignore unknown when parsing) test. For the previous two categories, there
is no change to existing testee programs. For tests with the last category, testee programs
should either enable ignoring unknown field during json parsing or skip the test.

* Fix python test

* Fix java

* Fix csharp

* Update document

* Update csharp generated code
2018-07-27 12:24:42 -07:00
Paul Yang
bdcbcabe5e
Add conformance test for php c back (#4966)
* Add conformance test for php c back

php c extension has different result for conformance test for different
php version and architecture. Try to add conformance back for php 7.1 c extension first.

* Disable conformance test for c extension on 32-bit architecture
32-bit and 64-bit have different failing tests

* Fix typo
2018-07-26 13:52:22 -07:00
Feng Xiao
2dcd6ae409
Remove/replace travis references (#4953)
* Remove/replace travis references.
2018-07-22 17:14:24 -07:00
Paul Yang
26eeec93e4
Enable ignoring unknown in json parsing in php (#4839)
* Enable ignoring unknown in json parsing in php

* Update generated descriptor files

* Update failure list for other languages.

* Remove unnecessary php files
2018-07-09 14:29:23 -07:00
BSBandme
82b490f6fd Fix cpp_distcheck 2018-07-09 11:37:39 -07:00
Adam Cozzette
f91cf0559c Updated Ruby conformance test failure list
This commit adds two entries to the conformance failure list for Ruby.
It seems that these particular test cases have been failing since they
were introduced in 5140bae383, so there
has not been any regression.
2018-03-23 10:23:47 -07:00
Adam Cozzette
ed4321d1cb
Merge pull request #4387 from acozzette/down-integrate
Integrated internal changes from Google
2018-03-20 16:14:32 -07:00
Adam Cozzette
ec40953257 Updated conformance failure lists 2018-03-20 14:44:30 -07:00