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

rake test fails with Ruby 3.0.0 #25

Open
kenhys opened this issue Jan 7, 2021 · 1 comment
Open

rake test fails with Ruby 3.0.0 #25

kenhys opened this issue Jan 7, 2021 · 1 comment

Comments

@kenhys
Copy link
Contributor

kenhys commented Jan 7, 2021

Problem

rake test fails with Ruby 3.0.0

Steps to replicate

  1. clone
  2. bundle install
  3. CI=true rake test

Expected Behavior

CI=yes rake test succeeds.

Your environment

  • OS version
% lsb_release -c
Codename:       sid
  • paste result of fluentd --version or td-agent --version
% fluentd --version
fluentd 1.12.0
  • plugin version
    • paste boot log of fluentd or td-agent
    • paste result of fluent-gem list, td-agent-gem list or your Gemfile.lock

Then, applied missing gems

diff --git a/fluent-plugin-irc.gemspec b/fluent-plugin-irc.gemspec
index 915455e..246e2bc 100644
--- a/fluent-plugin-irc.gemspec
+++ b/fluent-plugin-irc.gemspec
@@ -20,7 +20,9 @@ Gem::Specification.new do |s|
 
   s.add_runtime_dependency "fluentd", [">= 0.14.0", "< 2"]
   s.add_runtime_dependency "irc_parser"
+  s.add_runtime_dependency "async-http"
 
   s.add_development_dependency "test-unit"
   s.add_development_dependency "rake"
+  s.add_development_dependency "webrick"
 end

After it, install dependency.

% bundle install
Warning: the running version of Bundler (2.2.3) is older than the version that created the lockfile (2.2.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.2.4`.
Using rake 13.0.3
Using fiber-local 1.0.0
Using console 1.10.1
Using nio4r 2.5.4
Using timers 4.3.2
Using async 1.28.3
Using async-io 1.30.1
Using async-pool 0.3.3
Using protocol-http 0.21.0
Using protocol-http1 0.13.2
Using protocol-hpack 1.4.2
Using protocol-http2 0.14.1
Using async-http 0.54.1
Using bundler 2.2.3
Using concurrent-ruby 1.1.7
Using cool.io 1.7.0
Using http_parser.rb 0.6.0
Using msgpack 1.3.3
Using sigdump 0.2.4
Using serverengine 2.2.2
Using strptime 0.2.5
Using tzinfo 2.0.4
Using tzinfo-data 1.2020.6
Using yajl-ruby 1.4.1
Using fluentd 1.12.0
Using irc_parser 0.1.2
Using fluent-plugin-irc 0.1.0 from source at `.`
Using power_assert 1.2.0
Using test-unit 3.3.9
Using webrick 1.7.0
Bundle complete! 4 Gemfile dependencies, 30 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

Next, execute rake test.

/home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/singleton-0.1.1/lib/singleton.rb:141: warning: previous definition of __init__ was here
/home/kenhys/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/singleton.rb:152:in `undef_method': undefined method `extend_object' for class `Singleton' (NameError)
Did you mean?  extended
        from /home/kenhys/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/singleton.rb:152:in `singleton class'
        from /home/kenhys/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/singleton.rb:140:in `<module:Singleton>'
        from /home/kenhys/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/singleton.rb:94:in `<top (required)>'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/compat/output_chain.rb:17:in `require'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/compat/output_chain.rb:17:in `<top (required)>'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/compat/output.rb:27:in `require'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/compat/output.rb:27:in `<top (required)>'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/output.rb:17:in `require'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/output.rb:17:in `<top (required)>'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/agent.rb:19:in `require'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/agent.rb:19:in `<top (required)>'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/root_agent.rb:20:in `require'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/root_agent.rb:20:in `<top (required)>'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/engine.rb:21:in `require'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/engine.rb:21:in `<top (required)>'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/test/base.rb:18:in `require'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/test/base.rb:18:in `<top (required)>'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/test.rb:20:in `require'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/fluentd-1.12.0/lib/fluent/test.rb:20:in `<top (required)>'
        from /work/fluentd/plugins/fluent-plugin-irc/test/helper.rb:14:in `require'
        from /work/fluentd/plugins/fluent-plugin-irc/test/helper.rb:14:in `<top (required)>'
        from <internal:/home/kenhys/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/home/kenhys/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /work/fluentd/plugins/fluent-plugin-irc/test/plugin/test_out_irc.rb:1:in `<top (required)>'
        from <internal:/home/kenhys/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/home/kenhys/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/rake-13.0.3/lib/rake/rake_test_loader.rb:17:in `block in <main>'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/rake-13.0.3/lib/rake/rake_test_loader.rb:5:in `select'
        from /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/rake-13.0.3/lib/rake/rake_test_loader.rb:5:in `<main>'
rake aborted!
Command failed with status (1): [ruby -w -I"lib:lib:test" /home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/rake-13.0.3/lib/rake/rake_test_loader.rb "test/plugin/test_out_irc.rb" ]
/home/kenhys/.rvm/gems/ruby-3.0.0@work/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => test
(See full trace by running task with --trace)
@evansjp
Copy link

evansjp commented Mar 8, 2021

Also have this issue. Did you ever find a solution?

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