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

Warning on Ruby 3.3 because of requiring syslog package #247

Open
Earlopain opened this issue Jan 19, 2024 · 3 comments
Open

Warning on Ruby 3.3 because of requiring syslog package #247

Earlopain opened this issue Jan 19, 2024 · 3 comments

Comments

@Earlopain
Copy link

Ruby 3.3 will issue a warning when requiring syslog, Ruby 3.4 will raise an error. https://github.com/ruby/ruby/blob/master/doc/NEWS/NEWS-3.3.0.md#stdlib-updates

I'm talking about these lines of code:

logging/lib/logging.rb

Lines 9 to 15 in df41715

begin
require 'syslog'
HAVE_SYSLOG = true
rescue LoadError
HAVE_SYSLOG = false
end

This already handles the absense of syslog which is good so the gem will not break (much) in the future because of this. However, on Ruby 3.3 a warning message is logged nontheless. Users on linux that use the syslog appender will have that class be undefined on Ruby 3.4.

/home/user/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/logging-2.3.1/lib/logging.rb:10: warning: syslog was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add syslog to your Gemfile or gemspec. Also contact author of logging-2.3.1 to add syslog into its gemspec.

@mhenrixon
Copy link

This one is a little more critical though:

ArgumentError: comparison of String with nil failed (ArgumentError)

    msg = " #{RUBY_VERSION < SINCE[gem] ? "will no longer be" : "is not"} part of the default gems since Ruby #{SINCE[gem]}."
                             ^^^^^^^^^^
/home/runner/work/cosmos/cosmos/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/runner/work/cosmos/cosmos/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.14/lib/zeitwerk/kernel.rb:34:in `require'
/home/runner/work/cosmos/cosmos/vendor/bundle/ruby/3.3.0/gems/logging-2.3.1/lib/logging.rb:10:in `<main>'

@Earlopain
Copy link
Author

Ruby bug 😞 https://bugs.ruby-lang.org/issues/20450

@mhenrixon
Copy link

I only get this with the logging gem though 🤣

Thanks for the feedback

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

No branches or pull requests

2 participants