Commit Graph

31 Commits

Author SHA1 Message Date
zhangskz
0663080c5a
Revert third party/benchmark commit from Piper integrate and add ignore=dirty to submodule (#10104)
* Revert change to third_party/benchmark from Piper->Github sync

* Add ignore=dirty to third_party/benchmark submodule
2022-06-02 18:32:45 -04:00
Sandy Zhang
f138d5de25 Sync from Piper @452551755
PROTOBUF_SYNC_PIPER
2022-06-02 16:14:25 +00:00
David L. Jones
354aba886e
Add a test for bazel-built dist archives (#9929)
This also fixes some packaging rules that are needed for the result to be buildable.
2022-05-09 16:32:59 -07:00
David L. Jones
95da0ba5b4
Rename all BUILD files to BUILD.bazel (#9892)
This avoids conflicting names in a couple of cases.

1. Within google, we want to sync files but not name them BUILD (since the structure doesn't match).
2. On case-insensitive filesystems, `build` may be used for a build directory. Naming `BUILD.bazel` avoids potentioal conflicts.
2022-04-29 17:57:55 -07:00
FaBrand
244bbd6f95
Make genrule portable for windows (#9889)
* Make genrule portable for windows

Using this does remove a user dependency on a bash under windows

* Use portable genrule for zlib dependency
2022-04-29 10:24:10 -07:00
David L. Jones
d76f8c868c
Add source distribution packaging rules (#9835)
This change adds `rules_pkg`-based targets that will produce source distribution archives, similar to `make dist`.

These rules produce nearly the same outputs as `make dist`. However, there are some differences and caveats:

1. The outputs do not contain vendored googletest sources.
2. You have to run `autogen.sh` before `blaze build pkg:all`. This produces several autotools-related files directly into the source tree.
3. The output .zip files do not have a directory prefix like `protobuf-3.20.1-rc-1` (this will be addressed after [Substitute package variables in `pkg_zip#package_dir`. bazelbuild/rules_pkg#577](https://github.com/bazelbuild/rules_pkg/pull/577); the tar files do have this prefix, though.)
4. One file is missing from the archives, which is produced during the `make` build: benchmarks/gogo/cpp_no_group/cpp_benchmark.cc
5. In several places, I have explicitly excluded some files that are not in the autotools distribution outputs. I think most of those files should probably be included, but for now, I'm aiming for parity with `make dist`. These are marked with comments, so it should be easy to clean them up later.
2022-04-22 16:58:16 -07:00
なつき
d2fd441953
Do not use range based UTF-8 validation in truffleruby (#9769) 2022-04-18 16:12:20 -07:00
mkruskal-google
e9246cd789
Update CMake configuration to add a dependency on Abseil (#9793)
* Proof of concept for CMake Abseil dependency

* Hooked up Abseil linking

* Adding test binaries

* Reverting absl::string view use added for testing.  This will still be broken for automake and bazel

* Adding new cmake config to dist list

* Whitespace fixes and an attempt at fix for Windows Python Release (CMake version < 3.13)

* Hook up LTS to windows cmake

* Fix 'git cd' typo

* Adding clarifying comment for fix

* Adding abseil dependency to protobuf-lite too

* Update submodules instead of cloning abseil-cpp

* Adding explicit pointer to abseil root directory

Co-authored-by: Jason Lunn <jason.lunn@gmail.com>
Co-authored-by: Jorg Brown <jorg.brown@gmail.com>
2022-04-17 22:28:01 -04:00
Joshua Haberman
349d74d92e
Updated PHP upb, and utf8_range for Ruby/PHP (#9585)
* Updated PHP to the new version of upb.

This is a large change, as the upb API surface has been
renamed to follow Google style more closely.

* Fixed utf8_range.

* Updated Ruby for new utf8_range.

* Picked up new upb for PHP, with spelling fixes.

* Fixed the 32-bit build.
2022-03-05 11:55:57 -08:00
Joshua Haberman
012c8892ab Added utf8_range. 2022-01-21 21:01:07 -08:00
Adam Cozzette
f8a22b45c0
Remove references to six (#9096)
We no longer support Python 2 and therefore no longer need to depend on
six. I'm hoping this will make it possible to merge #8214.
2021-10-13 13:51:09 -07:00
Joshua Haberman
9d578a3a9c Ported Ruby to ABSL wyhash. 2021-08-02 15:32:01 -07: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
Joshua Haberman
579aa89014 Updated wyhash.h to pick up fix for spelling mistake. 2020-11-02 22:59:37 -08:00
Joshua Haberman
a6985e598c New version of upb, and a new hash function wyhash in third_party. 2020-11-02 08:09:11 -08:00
Yannic
fc7c65a258 Update six.BUILD 2019-10-28 16:28:41 -07:00
Yannic
3581ee24e9 Update six.BUILD 2019-10-28 16:28:41 -07:00
Yannic Bonenberger
29d650aefb [bazel] Add strip_prefix to download of @six
This way, we can avoid an unnecessary copy.
2019-10-28 16:28:41 -07:00
Ricky Pai
e0441b2f28 export third_party BUILD files so they are accessible to users 2019-10-04 08:39:15 -07:00
Adam Liddell
8199a01ff4 Move six.BUILD to third_party and update paths 2019-08-15 14:53:59 -07:00
Yannic Bonenberger
bf0c69e130 [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl (Part 2)
This change adds the required loads to examples and zlib.
For full compatibility with --incompatible_load_{cc,java,proto}_rules_from_bzl,
we will need to roll gtest to a newer version.
2019-07-29 14:14:04 -07:00
Adam Liddell
19ca196e4d Remove zlib copts flags when on Windows 2019-07-17 13:17:02 -07:00
Paul Yang
f66c981051 Revert "Add stack overflow protection for text format"
This reverts commit 6dcd81093c.
2019-02-15 10:03:39 -08:00
Vitaly Buka
6dcd81093c Add stack overflow protection for text format
It already exists for wire and json formats
2019-02-04 09:57:33 -08:00
Adam Cozzette
46f87f9740 Updated googletest submodule to the most recent upstream commit 2019-01-25 09:12:53 -08:00
Cody Schroeder
802d543173 Add Bazel config for zlib support (#5389)
* Add Bazel config for optional zlib support

* Add hard dependency on zlib

* Remove unused config_setting
2018-12-11 11:58:26 -08:00
Carlos O'Ryan
3c5442a95d Include googletest as a submodule (#3993)
Add googletest as a submodule in third_party/googletest.
2018-03-26 13:54:32 -07:00
Yilun Chong
7f1491506c upgrade submodule 2018-02-01 11:11:00 -08:00
Yilun Chong
1c062a65af Sync internal benchmark changes 2017-12-01 11:55:38 -08:00
Mehrdad Afshari
bb35f04fe6 Update google/benchmark submodule to v1.2
Fixed some build issues on ppc64le architecture
2017-10-30 12:30:00 -07:00
Joshua Haberman
a289d43608 Added C++ benchmark. (#1525) 2016-09-23 11:07:45 -07:00