Commit Graph

305 Commits

Author SHA1 Message Date
Derek Perez
bc45f92262
Bazel powered Java testing (#8506)
* Protobuf Java/Core Tests running w/ Bazel.

Also integrates rules_jvm_external and migrates existing maven deps
in place.

* Add test_suite target that maps to rule name.

* Lite tests passing in Bazel

* util tests passing with Bazel.

* Add conformance and build testing to //java:core

* Cleanup bzl style and lock down access to failure lists.

* Adding Java Lite conformance tests.

* rm newline

* parameterize conformance_test

This makes usage of failure lists more explicit.

* restrict visibility more for newly added libs and fix formatting.

* fix formatting and visibility.

* move testing.bzl to an internal package.

* fix file formatting.

* moving conformance_test to internal.bzl
2021-04-20 11:36:32 -07:00
Joshua Haberman
b7285b6c69 Sync from Piper @368903491
PROTOBUF_SYNC_PIPER
2021-04-16 12:59:54 -07:00
Joshua Haberman
ba3836703b Sync from Piper @368866736
PROTOBUF_SYNC_PIPER
2021-04-16 09:55:03 -07:00
Joshua Haberman
ce560630bf Sync from Piper @368734211
PROTOBUF_SYNC_PIPER
2021-04-15 15:53:17 -07:00
Joshua Haberman
77334e39a7 Merge tag 'refs/tags/sync-piper' into sync-stage 2021-03-22 13:05:55 -07:00
Joshua Haberman
96307d28f6 Sync from Piper @364389596
PROTOBUF_SYNC_PIPER
2021-03-22 13:05:55 -07:00
Yannic Bonenberger
aa5cb98712 Fix conformance_cpp 2021-03-10 10:05:31 +01:00
Joshua Haberman
9df42757f9 Sync from Piper @359788468
PROTOBUF_SYNC_PIPER
2021-02-26 10:37:37 -08:00
Abhishek Jain
0ef575beff
Fix compiler warnings issue found in conformance_test_runner#8189 (#8190) 2021-02-11 16:29:47 -08:00
Joshua Haberman
9abf6e2ab0
Ported Ruby extension to upb_msg (#8184)
* WIP.

* WIP.

* WIP.

* WIP.

* WIP.

* WIP.

* Added some missing files.

* WIP.

* WIP.

* Updated upb.

* Extension loads, but crashes immediately.

* Gets through the test suite without SEGV!

Still a lot of bugs to fix, but it is a major step!

214 tests, 378 assertions, 37 failures, 147 errors, 0 pendings, 0 omissions, 0 notifications
14.0187% passed

* Test and build for Ruby 3.0

* Fixed a few more bugs, efficient #inspect is almost done.

214 tests, 134243 assertions, 30 failures, 144 errors, 0 pendings, 0 omissions, 0 notifications
18.6916% passed

* Fixed message hash initialization and encode depth checking.

214 tests, 124651 assertions, 53 failures, 70 errors, 0 pendings, 0 omissions, 0 notifications
42.5234% passed

* A bunch of fixes to failing tests, now 70% passing.

214 tests, 202091 assertions, 41 failures, 23 errors, 0 pendings, 0 omissions, 0 notifications
70.0935% passed

* More than 80% of tests are passing now.

214 tests, 322331 assertions, 30 failures, 9 errors, 0 pendings, 0 omissions, 0 notifications
81.7757% passed

Unfortunately there is also a sporadic bug/segfault hanging around
that appears to be GC-related.

* Add linux/ruby30 and macos/ruby30

* Use rvm master for 3.0.0-preview2

* Over 90% of tests are passing!

214 tests, 349898 assertions, 15 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
92.5234% passed

* Passes all tests!

214 tests, 369388 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* A bunch of cleanup.

1. Removed a bunch of internal-only symbols from headers.
2. Required a frozen check to get a non-const pointer to a map or array.
3. De-duplicated the code to get a type argument for Map/RepeatedField.

* Removed a bunch more stuff from protobuf.h.  There is an intermittent assert failure.

Intermittent failure:

ruby: ../../../../ext/google/protobuf_c/protobuf.c:263: ObjectCache_Add: Assertion `rb_funcall(obj_cache2, (__builtin_constant_p("[]") ? __extension__ ({ static ID rb_intern_id_cache; if (!rb_intern_id_cache) rb_intern_id_cache = rb_intern2((("[]")
), (long)strlen(("[]"))); (ID) rb_intern_id_cache; }) : rb_intern("[]")), 1, key_rb) == val' failed

* Removed a few more things from protobuf.h.

* Ruby 3.0.0-preview2 to 3.0.0

* Require rake-compiler-dock >= 1.1.0

* More progress, fighting with the object cache.

* Passes on all Ruby versions!

* Updated and clarified comment regarding WeakMap.

* Fixed the wyhash compile.

* Fixed conformance tests for Ruby.

Conformance results now look like:

RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb

CONFORMANCE TEST BEGIN ====================================

CONFORMANCE SUITE PASSED: 1955 successes, 0 skipped, 58 expected failures, 0 unexpected failures.

CONFORMANCE TEST BEGIN ====================================

CONFORMANCE SUITE PASSED: 0 successes, 111 skipped, 8 expected failures, 0 unexpected failures.

Fixes include:

- Changed Ruby compiler to no longer reject proto2 maps.
- Changed Ruby compiler to emit a warning when proto2 extensions are
  present instead of rejecting the .proto file completely.
- Fixed conformance tests to allow proto2 and look up message by name
  instead of hardcoding a specific list of messages.
- Fixed conformance test to support the "ignore unknown" option for
  JSON.
- Fixed conformance test to properly report serialization errors.

* Removed debug printf and fixed #inspect for floats.

* Fixed compatibility test to have proper semantics for #to_json.

* Updated Makefile.am with new file list.

* Don't try to copy wyhash when inside Docker.

* Fixed bug where we would forget that a sub-object is frozen in Ruby >=2.7.

* Avoid exporting unneeded symbols and refactored a bit of code.

* Some more refactoring.

* Simplified and added more comments.

* Some more comments and simplification. Added a missing license block.

Co-authored-by: Masaki Hara <hara@wantedly.com>
2021-01-13 12:16:25 -08:00
Rob Widmer
24b2094f8a Set up testing configuration for jruby 2020-12-11 16:02:41 -08:00
Joshua Haberman
920803e18d Merge tag 'refs/tags/sync-piper' into sync-stage 2020-11-20 10:44:58 -08:00
Joshua Haberman
5c028d6cf4 Sync from Piper @343521567
PROTOBUF_SYNC_PIPER
2020-11-20 10:44:58 -08:00
Joshua Haberman
f5ab3b166c PHP: Removed 32-bit-specific PHP failure list.
32 and 64-bit PHP should have the same set of failures now.
2020-11-02 10:45:10 -08:00
Joshua Haberman
6e19526525 PHP: Removed previously failing tests from the failure list. 2020-11-02 10:29:42 -08:00
Joshua Haberman
709775b67e Added missing semicolon. 2020-10-28 10:56:51 -07:00
Joshua Haberman
69b245e63a Added Python 2.7-specific failure list for Python/C++ also. 2020-10-28 10:35:06 -07:00
Joshua Haberman
ee68c9b29c Added text format failure list for Python 2.7. 2020-10-28 10:05:07 -07:00
Joshua Haberman
036865fa7f Add C++ text format failure list, and a Python 2.7 text format failure list. 2020-10-28 09:49:55 -07:00
Joshua Haberman
981be5be20 Python/C++ text_format conformance test fix.
Pass the Python/C++ text_format failure list to the conformance runner.
2020-10-23 11:59:56 -07:00
Joshua Haberman
de371235c9 Sync from Piper @338284531
PROTOBUF_SYNC_PIPER
2020-10-21 10:04:14 -07:00
Joshua Haberman
820d1ca5af Merge tag 'refs/tags/sync-piper' into sync-stage 2020-10-21 10:04:14 -07:00
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