-
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
Protobuf can't be required on Ruby 2.6 #5161
Comments
I was able to get this to work by manually specifying the platform is
I'm not sure if that's supported/expected, but it did get me unblocked. 😊 |
At the moment google-protobuf has issues building on Ruby 2.6 (protocolbuffers/protobuf#5161) We don't however want to skip other tests in 3 most important gems. Added test to fail when such skips are no longer needed. Closes #431
This is the workaround we have been given when a new version of Ruby is released. The pre-compiled gems usually show up ~February, so until then we either have to set the platform and compile the gems when installing, or use the previous Ruby version until the pre-compiled gems are available. |
One can install (and successfully require) google-protobuf on Ruby 2.6 when specifying build platform: protocolbuffers/protobuf#5161 (comment) That however does not play well with Bundler. I did not manage to override platform for single gem in bundle (being on OSX) nor to make bundler use pre-built gem for different platform. Apparently correctly pre-built gems will land in Feb: protocolbuffers/protobuf#5161 (comment) Similar kertuffle for JRuby: protocolbuffers/protobuf#1594 I'd rather skip it altogether now and re-evaluate in the future. [#431] [#432] [#461]
- and it requires special installation from protocolbuffers/protobuf#5161
This allows mutation/testing on Ruby 2.6. Related: https://twitter.com/pawelpacana/status/1080576829872844801 protocolbuffers/protobuf#5161 Private source to be removed once there's an official update on rubygems.org. Building https://github.com/protocolbuffers/protobuf: 1. compile C++ version to have src/proto ready for use 2. on macos: rake build clobber_package gem gem:native 3. on linux: rake build clobber_package gem gem:native as well, but make sure to update rake-compiler* dependencies to newest ones, update RUBY_CC_VERSION to include 2.6.0 and disable non-linux from ext.cross_platform
This allows mutation/testing on Ruby 2.6. Related: https://twitter.com/pawelpacana/status/1080576829872844801 protocolbuffers/protobuf#5161 Private source to be removed once there's an official update on rubygems.org. Building https://github.com/protocolbuffers/protobuf: 1. compile C++ version to have src/proto ready for use 2. on macos: rake build clobber_package gem gem:native 3. on linux: rake build clobber_package gem gem:native as well, but make sure to update rake-compiler* dependencies to newest ones, update RUBY_CC_VERSION to include 2.6.0 and disable non-linux from ext.cross_platform
Although I can use ruby 2.6.0 to do |
I tried to copy the lib dir generated by rake test in ruby dir. |
Fixed by #5537 |
Btw. do you plan to push rebuilt gems to rubygems.org as well? |
Since this issue is part of |
Glancing at the diff, it doesn't seem tied to protobuf-3.7.0 (AFAICT); would be great to get this backported to a rubygem w/protobuf-3.6.x as currently it's blocking us moving to Ruby 2.6. |
I'm still having issues after running this:
It results in the same error as before, and down grading to ruby 2.5 is a pain on arch linux. Any fix? |
I am currently blocked by creating gem on linux. |
@macmv Using rvm or rbenv is a good way to be able to install any Ruby version you need on your dev machine. They work on Arch Linux. |
We have released 3.7.0-rc2, which supports ruby 2.6
…On Sat, Feb 2, 2019 at 21:01 Matt Welke ***@***.***> wrote:
@macmv <https://github.com/macmv> Using rvm or rbenv is a good way to be
able to install any Ruby version you need on your dev machine. They work on
Arch Linux.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#5161 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE9H5WVibXihI4FLs9Z1u7bBtyH_XjJoks5vJm01gaJpZM4WsuvV>
.
|
Looks like 3.7.0 was released with Ruby 2.6 support. |
|
What version of protobuf and what language are you using?
Version: v3.6.1
Language: Ruby
What operating system (Linux, Windows, ...) and version?
What runtime / compiler are you using (e.g., python version or gcc version)
What did you do?
Steps to reproduce the behavior:
What did you expect to see
The gem can be required
What did you see instead?
An error indicating the gem cannot be required. Here is the output on my terminal:
Anything else we should know about your project / environment
I am working against a development version of Ruby.
Thanks!
The text was updated successfully, but these errors were encountered: