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

Add ruby 3.0.0 support #7922

Closed
sriedel opened this issue Sep 28, 2020 · 6 comments
Closed

Add ruby 3.0.0 support #7922

sriedel opened this issue Sep 28, 2020 · 6 comments
Assignees
Labels

Comments

@sriedel
Copy link

sriedel commented Sep 28, 2020

What language does this apply to?
ruby

Describe the problem you are trying to solve.
Ruby 3.0.0-preview1 was released over the weekend. We'd like to check our ruby services before the official ruby 3.0 release (probably on christmas, as this is the usual ruby release date for new versions). However the google-protobuf gem explicitly prohibits bumping the ruby version to beyond 2.7 (the current stable version):

Gem::RuntimeRequirementNotMetError: google-protobuf requires Ruby version >= 2.3, < 2.8.dev. The current ruby version is 3.0.0.preview1.
 An error occurred while installing google-protobuf (3.13.0), and Bundler cannot continue.    
 Make sure that `gem install google-protobuf -v '3.13.0' --source 'https://gem.givve.io/'` succeeds before bundling.

Describe the solution you'd like
The google-protobuf gem is installable under ruby 3.0.0. I'd be happy with a solution that is locked to the preview without any guarantee of functionality in production environments.

@acozzette
Copy link
Member

Do you know where this requirement is coming from? I see that our gemspec requires >= 2.3 but I don't see the < 2.8.dev anywhere (is that coming from one of our dependencies?)

@sriedel
Copy link
Author

sriedel commented Sep 29, 2020

After hours of being stumped and studying the code for both bundler and gem (since if it isn't provided by you, it must be injected somewhere, right?), it dawned on me that the google-protobuf gem is being supplied in different versions:

So this seems to be injected by the build process or build system. Which makes sense since the ABI has changed.
I'll have to figure out how to tell bundler that I don't want the precompiled version. Adding a ruby-3.0.0 version to your build system would be great too, though :)

@acozzette
Copy link
Member

@sriedel Thanks for tracking that down, that is a little surprising but I guess it makes sense. I think in principle we should be able to make our next release add a ruby-3.0 compatible version. @haberman Does that sound doable?

@TeBoring TeBoring added the ruby label Oct 5, 2020
marcotc added a commit to DataDog/dd-trace-rb that referenced this issue Dec 21, 2020
This PR adds support Ruby the latest Ruby 3.0 build (preview2). Given the close proximity of the final release, we don't foresee any major compatibility issues with the stable release.

We added two variants of Ruby 3.0 to CI: `3.0` and `3.0-jit`, to allow us to test if the new JIT affects the tracer correctness and performance.

Overall, there was only one change in the Sinatra integration necessary for the tracer to support Ruby 3.0.

#### Temporarily disabled features for Ruby 3.0
* `rdkafka`, does not install. We put a fix up for it, pending merge and release: karafka/rdkafka-ruby#144
* `protobuf`, does not install. Pending: protocolbuffers/protobuf#7922
* Rails tests: only Rails 6.1 supports Ruby 3.0: older versions fail as they lack this [this fix](rails/rails@3f27aa8cdf8).
    Given we don't currently have full support for Rails 6.1, we don't officially support Rails in Ruby 3.0.
    Thus, **supporting Rails 6.1 should be a priority follow up task for us.**

I'm holding off updating our GettingStarted.md, given the lack of support for Rails and the fact that full Ruby 3.0 is not here yet. I tried to update our docs while mentioning the lack of Rails support, but I don't believe it reads very clearly.
@bilby91
Copy link

bilby91 commented Dec 29, 2020

Is there any ETA for supporting ruby 3.0 ?

@KapilSachdev
Copy link

xref: #8134

@haberman
Copy link
Member

This should be fixed as of #8184, released in 3.15.0-rc1. Please let us know if you run into problems.

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

No branches or pull requests

6 participants