We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What version of protobuf and what language are you using? Version: 3.8.1 & 3.9.1 Language: Ruby
What operating system (Linux, Windows, ...) and version? N/A
What runtime / compiler are you using (e.g., python version or gcc version) N/A
What did you do?
Upgrading from 3.8.1 to 3.9.1 Ruby library breaks compatibility. Specifically this commit - 565154a
to_hash was dropped (since it really is a duplicate of the more common to_h) . However, there are implications to removing this method.
For example, Rails as_json method looks for to_hash (not to_h). https://apidock.com/rails/Object/as_json
I consider this a backwards incompatible API change in a minor version upgrade.
The text was updated successfully, but these errors were encountered:
#6166 Seems the removal was intentional. And they were aware of the breakage.
Sorry, something went wrong.
Sorry for the breakage, the existing behavior was arguably broken and I think it should be easy to simulate the old behavior with something like:
# Add to_hash to MessageExts, which is included in every message instance. module Google module Protobuf module MessageExts def to_hash self.to_h end end end end
haberman
No branches or pull requests
What version of protobuf and what language are you using?
Version: 3.8.1 & 3.9.1
Language: Ruby
What operating system (Linux, Windows, ...) and version?
N/A
What runtime / compiler are you using (e.g., python version or gcc version)
N/A
What did you do?
Upgrading from 3.8.1 to 3.9.1 Ruby library breaks compatibility.
Specifically this commit - 565154a
to_hash was dropped (since it really is a duplicate of the more common to_h) . However, there are implications to removing this method.
For example, Rails as_json method looks for to_hash (not to_h).
https://apidock.com/rails/Object/as_json
I consider this a backwards incompatible API change in a minor version upgrade.
The text was updated successfully, but these errors were encountered: