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

Breaking changes in google-protobuf 4+ #314

Open
dark-panda opened this issue Mar 18, 2024 · 4 comments
Open

Breaking changes in google-protobuf 4+ #314

dark-panda opened this issue Mar 18, 2024 · 4 comments

Comments

@dark-panda
Copy link

The release of google-protobuf 4 cause pg_query to throw exceptions when the older Ruby DSL methods are used. For instance:

NoMethodError: undefined method `build' for #<Google::Protobuf::DescriptorPool:0x000000010ceb94b8> (NoMethodError)

Google::Protobuf::DescriptorPool.generated_pool.build do
                                               ^^^^^^
~/.bundles/securicy-app/ruby/3.2.0/gems/pg_query-2.2.1/lib/pg_query/pg_query_pb.rb:6:in `<top (required)>'

The change in google-protobuf is here: protocolbuffers/protobuf@5cfc9e7

Announcement of the breaking changes is the: https://protobuf.dev/news/2023-04-20/

@wflanagan
Copy link

I've hit this too.. any updates on a fix?

@mcg
Copy link

mcg commented Apr 29, 2024

Hit this today trying to go to Ruby 3.3. Any ETA on Fix?

@lfittl
Copy link
Member

lfittl commented Apr 29, 2024

We haven't triaged this in detail yet - for now the recommendation would be to pin google-protobuf to an older version until we've made the necessary changes.

For those running into this, is there a requirement to move to the newer google-protobuf?

@viktorianer
Copy link

Hey @dark-panda
Can you make me remember, how I can reproduce this error?

Because, I do remember, I saw exact the same trace, but can not reproduce it anymore on my app with Rails
7.0.8.1 and Ruby 3.3.

I am working an upgrade from Dependabot, where I had before:
gem "google-protobuf", "~> 3.25", ">= 3.25.3"

And now:
gem "google-protobuf", "~> 4.26

And everything works 💯.

Also, the gem prosopite, which depends on pg_query, works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants