Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for options in CRuby, JRuby and FFI #14594

Closed
wants to merge 22 commits into from

Conversation

JasonLunn
Copy link
Contributor

@JasonLunn JasonLunn commented Nov 1, 2023

Rewrite and extension of #12828, with additional work for JRuby. Partially fixes #1198 by adding support for custom options. Handling of extensions will be handled in a follow up.

Also includes these unrelated fixes:

  • Removes code echo between google/protobuf/repeated_field.rb and google/protobuf/ffi/repeated_field.rb by require'ing the former in the latter.
  • Adds missing calles to testFrozen() from methods of RepeatedField under JRuby that mutate.
  • Various typos in comments.

@JasonLunn JasonLunn requested a review from a team as a code owner November 1, 2023 22:01
@JasonLunn JasonLunn requested review from ericsalo and removed request for a team and ericsalo November 1, 2023 22:01
@JasonLunn JasonLunn added ruby jruby Issues unique to the JRuby interpreter labels Nov 1, 2023
…internal_deep_freeze` for JRuby message classes.
…ternal_deep_freeze` for FFI message classes.
ruby/ext/google/protobuf_c/defs.c Outdated Show resolved Hide resolved
ruby/ext/google/protobuf_c/defs.c Outdated Show resolved Hide resolved
ruby/ext/google/protobuf_c/glue.c Show resolved Hide resolved
* Pass arena to glue functions.
* Memoize `options` accessor.
* Remove use of VLA.
* Adding test coverage for `FieldOptions`
* Handle case where fields are not materialized until after `freeze`
@JasonLunn JasonLunn changed the title Add support for options in Ruby and JRuby Add support for options in CRuby, JRuby and FFI Nov 8, 2023
ruby/ext/google/protobuf_c/map.c Outdated Show resolved Hide resolved
@copybara-service copybara-service bot closed this in ae1f2b7 Nov 9, 2023
JasonLunn added a commit that referenced this pull request Nov 13, 2023
Rewrrte and extension of #12828, with additional work for JRuby. Partially fixes #1198 by adding support for custom options. Handling of extensions will be handled in a follow up.

Also includes these unrelated fixes:
* Removes code echo between `google/protobuf/repeated_field.rb` and `google/protobuf/ffi/repeated_field.rb` by `require`'ing the former in the latter.
* Adds missing calles to `testFrozen()` from methods of `RepeatedField` under JRuby that mutate.
* Various typos in comments.

Closes #14594

COPYBARA_INTEGRATE_REVIEW=#14594 from protocolbuffers:add-support-for-options-in-ruby 16cc9e3
PiperOrigin-RevId: 580848874
zhangskz pushed a commit that referenced this pull request Nov 13, 2023
Rewrrte and extension of #12828, with additional work for JRuby. Partially fixes #1198 by adding support for custom options. Handling of extensions will be handled in a follow up.

Also includes these unrelated fixes:
* Removes code echo between `google/protobuf/repeated_field.rb` and `google/protobuf/ffi/repeated_field.rb` by `require`'ing the former in the latter.
* Adds missing calles to `testFrozen()` from methods of `RepeatedField` under JRuby that mutate.
* Various typos in comments.

Closes #14594

COPYBARA_INTEGRATE_REVIEW=#14594 from protocolbuffers:add-support-for-options-in-ruby 16cc9e3
PiperOrigin-RevId: 580848874
copybara-service bot pushed a commit that referenced this pull request Nov 14, 2023
Follow up to #14594, which added support for custom options, this PR implements extensions support, which should fully resolve #1198.

Closes #14703

COPYBARA_INTEGRATE_REVIEW=#14703 from protocolbuffers:add-support-for-extensions-in-ruby 601aca4
PiperOrigin-RevId: 582460674
zhangskz pushed a commit that referenced this pull request Nov 14, 2023
Follow up to #14594, which added support for custom options, this PR implements extensions support, which should fully resolve #1198.

Closes #14703

COPYBARA_INTEGRATE_REVIEW=#14703 from protocolbuffers:add-support-for-extensions-in-ruby 601aca4
PiperOrigin-RevId: 582460674
zhangskz added a commit that referenced this pull request Nov 15, 2023
…4756)

Follow up to #14594, which added support for custom options, this PR implements extensions support, which should fully resolve #1198.

Closes #14703

COPYBARA_INTEGRATE_REVIEW=#14703 from protocolbuffers:add-support-for-extensions-in-ruby 601aca4
PiperOrigin-RevId: 582460674

Co-authored-by: Jason Lunn <jason.lunn@gmail.com>
Copy link

@Axtcody89 Axtcody89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Help secure browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jruby Issues unique to the JRuby interpreter ruby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to use custom options in Ruby
4 participants