roo-rb / roo

Roo provides an interface to spreadsheets of several sorts.
MIT License
2.78k stars 501 forks source link

Warnings are displayed when roo is used with Ruby 3.3.0 #604

Open mark-young-atg opened 6 months ago

mark-young-atg commented 6 months ago

Steps to reproduce

Running code that uses the roo gem with Ruby 3.3.0 causes the following warnings to be shown

.../gems/roo-2.10.0/lib/roo/open_office.rb:9: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. Also contact author of roo-2.10.0 to add base64 into its gemspec. .../gems/roo-2.10.0/lib/roo/csv.rb:3: warning: csv was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add csv to your Gemfile or gemspec. Also contact author of roo-2.10.0 to add csv into its gemspec.

Issue

This is a deprecation warning that has been added to Ruby 3.3.0 and which will cause roo to fail if run with Ruby 3.4 https://rubyreferences.github.io/rubychanges/3.3.html#gems-that-are-warned-to-become-bundled-in-the-next-version

System configuration

Roo version: 2.10.0

Ruby version: 3.3.0

Further notes

I initially intended to create a PR for this by adding the following to the roo.gemspec file:

spec.add_dependency 'base64'
spec.add_dependency 'csv'

However that caused the rspec tests to fail. So I bailed and created this issue instead.

sydverisk commented 5 months ago

Hi @mark-young-atg Thanks for the issue, I am looking to upgrade my ruby environment to 3.3.0 and I have been using the roo 2.8.3 version. I am considering to upgrade to 2.10.1. Apart from the warnings are there any compatibility issues you are facing ? Any information or leads would be very beneficial to me! Thanks!

mark-young-atg commented 5 months ago

Hi @sydverisk Apologies for the delay in responding. I'm not aware of any compatibility issues. Have you looked at the change log just in case it mentions something that you specifically use, although my reading of it doesn't raise any compatibility alarm bells.

frederikspang commented 1 month ago

While this is, correctly, not a compatibility issue, it will be for supporting Ruby 3.4.0.

The issue stems from a change in what gems (csv and base64, in this case), are included by default in the Ruby standard library. Meaning, that we will have errors beginning in Ruby 3.4.