-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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
[Ruby] JRuby - type of oneof is always nil after decoding #7831
Comments
Sorry that we haven't supported JRuby for a long time. The major reason is we don't know how to release it. @haberman shall we set it up again? |
Thanks. I would really appreciate it if JRuby would get supported again. We normally use plain Ruby for our applications, but when we need to access Java libraries, we have to use JRuby instead. For these cases we also have to use the JRuby version of protobuf. BTW, I built the google-protobuf-3.13.0-java.gem using the instructions in ./ruby/README.md. I would not mind helping out in tracking down this bug but I do not have an idea where to start. |
@vdbijl Are you able to try out the restored JRuby support and see if it still has the issue? I don't think this should be a hard problem to solve, but I want to make sure you have been able to reproduce it in the updated support logic. |
Hello @headius and @TeBoring, awesome news in the new year. On main the issue is indeed solved, but not yet on the released 3.14.0 gem (also not on the 4.0 release candidates btw). Do you already have an idea about when you want to release another version? We'll make a development gem to use in the mean time. |
I am willing to help get the JRuby support released again but I do not have any permissions for any of the relevant services. Folks that assisted getting the JRuby support restored like @rdubya might be in a better position since they are familiar with how the gem gets built. |
I think it was merged after 3.14 was released, so maybe this is a question for @acozzette or one of the other maintainers. |
Let's aim for publishing a JRuby gem with the 3.15.0 release. We don't have anyone on the team who has the time and expertise to work on JRuby, so I'm afraid we will not be able to put any official support behind it, but we should at least be able to publish the gem. |
@acozzette awesome thanks! AFAICT if there's anyone with Ruby knowledge on the team, they can also make the JRuby version of the gem. And a big thank you to everyone that fixed this bug! |
Closing per the last update from @TCRuys . |
What version of protobuf and what language are you using?
Version: 3.13.0
Language: Ruby
What operating system (Linux, Windows, ...) and version?
Linux Ubuntu 16.x and 18.x.
What runtime / compiler are you using (e.g., python version or gcc version)
Ruby 2.6.3 and JRuby 9.2.9.0.
But this bug is already in protobuf for JRuby for a long time...
What did you do?
Consider the following Ruby script:
What did you expect to see
Under Ruby this script does not report any assertion violations, as expected.
What did you see instead?
Under JRuby, the last assert fails as m2.my_oneof is nil instead of :b.
This means that for a receiver of message it is not clear which of the fields of the oneof has been set.
The text was updated successfully, but these errors were encountered: