2014-12-12 23:58:26 +00:00
|
|
|
Gem::Specification.new do |s|
|
|
|
|
s.name = "google-protobuf"
|
2021-06-04 21:21:39 +00:00
|
|
|
s.version = "3.17.3"
|
2019-08-22 21:32:06 +00:00
|
|
|
git_tag = "v#{s.version.to_s.sub('.rc.', '-rc')}" # Converts X.Y.Z.rc.N to vX.Y.Z-rcN, used for the git tag
|
2017-02-13 22:16:38 +00:00
|
|
|
s.licenses = ["BSD-3-Clause"]
|
2014-12-12 23:58:26 +00:00
|
|
|
s.summary = "Protocol Buffers"
|
|
|
|
s.description = "Protocol Buffers are Google's data interchange format."
|
2015-05-01 15:54:18 +00:00
|
|
|
s.homepage = "https://developers.google.com/protocol-buffers"
|
2014-12-12 23:58:26 +00:00
|
|
|
s.authors = ["Protobuf Authors"]
|
|
|
|
s.email = "protobuf@googlegroups.com"
|
2019-08-22 21:32:06 +00:00
|
|
|
s.metadata = { "source_code_uri" => "https://github.com/protocolbuffers/protobuf/tree/#{git_tag}/ruby" }
|
2014-12-12 23:58:26 +00:00
|
|
|
s.require_paths = ["lib"]
|
2016-02-05 23:55:28 +00:00
|
|
|
s.files = Dir.glob('lib/**/*.rb')
|
2016-02-04 22:18:14 +00:00
|
|
|
if RUBY_PLATFORM == "java"
|
2016-09-29 04:18:55 +00:00
|
|
|
s.platform = "java"
|
2016-02-04 22:18:14 +00:00
|
|
|
s.files += ["lib/google/protobuf_java.jar"]
|
|
|
|
else
|
2016-02-05 23:55:28 +00:00
|
|
|
s.files += Dir.glob('ext/**/*')
|
2014-12-24 14:48:41 +00:00
|
|
|
s.extensions= ["ext/google/protobuf_c/extconf.rb"]
|
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 20:16:25 +00:00
|
|
|
s.add_development_dependency "rake-compiler-dock", ">= 1.1.0", "< 2.0"
|
2014-12-24 14:48:41 +00:00
|
|
|
end
|
|
|
|
s.test_files = ["tests/basic.rb",
|
|
|
|
"tests/stress.rb",
|
|
|
|
"tests/generated_code_test.rb"]
|
2019-05-07 00:07:46 +00:00
|
|
|
s.required_ruby_version = '>= 2.3'
|
2020-04-17 06:31:47 +00:00
|
|
|
s.add_development_dependency "rake-compiler", "~> 1.1.0"
|
2017-02-13 22:16:38 +00:00
|
|
|
s.add_development_dependency "test-unit", '~> 3.0', '>= 3.0.9'
|
2016-09-29 21:31:11 +00:00
|
|
|
s.add_development_dependency "rubygems-tasks", "~> 0.2.4"
|
2014-12-12 23:58:26 +00:00
|
|
|
end
|