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

Fix ruby 3.4 compatibility #322

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

PikachuEXE
Copy link

Same as #320 but that PR got no workflow to approve anymore and author not responding for 5 days

@msakrejda
Copy link
Contributor

Thanks for opening a new PR!

@PikachuEXE
Copy link
Author

No idea what's wrong

@seanlinsley
Copy link
Member

I'm not sure what changed in Ruby 3.4 for this require to no longer be needed, but we'll surely need to still require it for older Ruby versions. For example:

require 'pg_query/pg_query' unless RUBY_VERSION > '3.4'

Also note that you'll want to add Ruby 3.4 to the CI matrix. But with the comment on that line, there may be some extra work to support Ruby 3.4 in the protobuf gem.

@PikachuEXE PikachuEXE force-pushed the patch-1 branch 2 times, most recently from 52b98a2 to b973a95 Compare December 20, 2024 00:52
@PikachuEXE
Copy link
Author

Updated, added 3.4.0-rc1 to matrix (would 3.4 pick up rc versions? I dunno

Found [google-protobuf](https://rubygems.org/gems/google-protobuf) PR for ruby 3.4 protocolbuffers/protobuf#19752 but CI failing so no idea if it supports 3.4 yet

@PikachuEXE
Copy link
Author

I just run locally to see without workflow approval

Without the require some methods are not defined
image

Adding back the require brings us back to the same issue...
image

@PikachuEXE
Copy link
Author

Turns out it might be development version specific issue
See grpc/grpc#31970 (I took some code changes from that gem's latest version)

Locally run on 3.2, 3.3, 3.4.0-rc1
image

No idea how to test freebsd one (not in CI matrix as well)

@PikachuEXE
Copy link
Author

PikachuEXE commented Dec 20, 2024

Update Gemfile.lock I guess...?
(For my own gems I never got it checked-in

Also 3.4.0-rc1 is unavailable on windows. Do you prefer skipping it or using head?
2024-12-21 04_13_19-Window

Update 1: made changes to just ruby-head

@PikachuEXE
Copy link
Author

Yes I forgot to run bundle update, my fault...

@msakrejda
Copy link
Contributor

It looks like it's still failing on 3.4 due to protobuf issues, but it's also failing on 2.7. I think for 2.7, we could consider dropping it, since that's been out of support for over a year...

@PikachuEXE
Copy link
Author

Ya google-protobuf native gems are declared to be incompatible with 3.4 until 3.4 released
We can still test 2.7 if Gemfile.lock is dropped.

@PikachuEXE
Copy link
Author

PikachuEXE commented Dec 26, 2024

Do we want to try using force_ruby_platform just to see if CI passes? (Can still wait for native version to be released

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

Successfully merging this pull request may close these issues.

3 participants