Closed emiltin closed 11 months ago
This warning is pointing out that io-event
could potentially break on a future version of Ruby. However, that is unlikely to occur in practice as the impact would be pretty big.
I hope to finish IO::Buffer
by Ruby 3.3 so the warning will be removed when that happens.
In terms of removing the warning before that, we could probably silence it, but I suppose that defeats the purpose of the warning.
Thank you for the info! I agree, silencing the warning would not be a good idea. I was wondering if it was perhaps an issue with my installation, but I'll just leave the warning be.
FWIW I silenced with a Ruby version check so I'll remember to check again later, like so:
Kernel.silence_warnings do
raise("check IO::Buffer warning") unless RUBY_VERSION == "3.2.2"
Bundler.require(*Rails.groups)
end
Please don't be mad at me, I know it's bad form! 😉
A softer approach than silencing all warnings, you can suppress just the experimental ones:
original, Warning[:experimental] = Warning[:experimental], false
Bundler.require(*Rails.groups)
Warning[:experimental] = original
Or use the ruby -W:no-experimental
flag at runtime.
If you are running on Ruby 3.3, this warning should no longer be emitted:
Hi, When using the async gem with Ruby 3.2.2 on macOS, I get this warning:
/Users/emiltin/.local/share/rtx/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/io-event-1.3.2/lib/io/event/support.rb:24: warning: IO::Buffer is experimental and both the Ruby and C interface may change in the future!
This seems to come from the Ruby stdlib, but is there anyway to avoid it at the momemt?