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

Failure starting up because of dependency on old version of churn #277

Open
hakanai opened this issue Jun 16, 2016 · 3 comments
Open

Failure starting up because of dependency on old version of churn #277

hakanai opened this issue Jun 16, 2016 · 3 comments

Comments

@hakanai
Copy link

hakanai commented Jun 16, 2016

On running metric_fu, I get an error:

bucket:trunk tester$ bundle exec metric_fu
******* STARTING METRIC cane
******* ENDING METRIC cane
******* STARTING METRIC churn
bundler: failed to load command: metric_fu (/Users/tester/DevEnv/rbenv/versions/2.1.2/bin/metric_fu)
RuntimeError: child class must implement
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/churn-0.0.35/lib/churn/scm/source_control.rb:33:in `get_revisions'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/churn-0.0.35/lib/churn/calculator.rb:270:in `parse_log_for_revision_changes'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/churn-0.0.35/lib/churn/calculator.rb:95:in `emit'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/churn-0.0.35/lib/churn/calculator.rb:51:in `report'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/metrics/churn/generator.rb:34:in `run'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/metrics/churn/generator.rb:12:in `emit'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/generator.rb:104:in `generate_result'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/reporting/result.rb:48:in `add'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/run.rb:21:in `block in measure'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/run.rb:19:in `each'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/run.rb:19:in `measure'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/run.rb:9:in `run'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/cli/helper.rb:19:in `run'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/lib/metric_fu/cli/client.rb:19:in `run'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/metric_fu-4.12.0/bin/metric_fu:9:in `<top (required)>'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/bin/metric_fu:23:in `load'
  /Users/tester/DevEnv/rbenv/versions/2.1.2/bin/metric_fu:23:in `<top (required)>'

churn themselves already had this error reported and it's fixed in the current version. I can't forcibly update to the current version in my own Gemfile, because metric_fu is pinned to an older version:

s.add_runtime_dependency "churn",                 ["~> 0.0.35"]

Here's the diagnostics, in case there is something else wrong with my environment which is causing this:

    bucket:trunk tester$ bundle exec metric_fu --debug-info
    {"Ruby"=>
      {"Engine"=>"ruby",
       "Version"=>"2.1.2",
       "Patchlevel"=>95,
       "Ripper Support"=>true,
       "Rubygems Version"=>"2.2.2",
       "Long Description"=>
        "ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]"},
     "Environment"=>
      {"VERBOSE"=>"false",
       "External Encoding"=>"UTF-8",
       "Internal Encoding"=>"",
       "Host Architecture"=>"x86_64-apple-darwin13.1.0",
       "Ruby Prefix"=>"/Users/tester/DevEnv/rbenv/versions/2.1.2",
       "Ruby Options"=>"RUBYOPT=-rbundler/setup"},
     "MetricFu"=>
      {"Version"=>"4.12.0",
       "Verbose Mode"=>false,
       "Enabled Metrics"=>
        [:cane,
         :churn,
         :flay,
         :flog,
         :stats,
         :saikuro,
         :reek,
         :roodi,
         :rails_best_practices,
         :hotspots],
       "Dependencies"=>
        [{"name"=>"flay", "version"=>[">= 2.0.1", "~> 2.1"]},
         {"name"=>"churn", "version"=>["~> 0.0.35"]},
         {"name"=>"flog", "version"=>[">= 4.1.1", "~> 4.1"]},
         {"name"=>"reek", "version"=>["< 3.0", ">= 1.3.4"]},
         {"name"=>"cane", "version"=>[">= 2.5.2", "~> 2.5"]},
         {"name"=>"rails_best_practices", "version"=>[">= 1.14.3", "~> 1.14"]},
         {"name"=>"saikuro", "version"=>[">= 1.1.3", "~> 1.1"]},
         {"name"=>"roodi", "version"=>["~> 3.1"]},
         {"name"=>"code_metrics", "version"=>["~> 0.1"]},
         {"name"=>"redcard", "version"=>[">= 0"]},
         {"name"=>"coderay", "version"=>[">= 0"]},
         {"name"=>"multi_json", "version"=>[">= 0"]},
         {"name"=>"launchy", "version"=>["~> 2.0"]},
         {"name"=>"rcov", "version"=>["~> 0.8"]}]}}

For now I guess I can just turn churn off.

@bf4
Copy link
Member

bf4 commented Jun 17, 2016

Thanks. I need some help maintaining metric_fu ... :)

@nirnaeth
Copy link

nirnaeth commented Oct 5, 2016

has anybody else being able to reproduce this? I've tried today, but didn't manage to. I've used the same versions of ruby and metric_fu. the only difference I can see in the debug info is in the architecture because my version of the host is x86_64-apple-darwin15.6.0.

@hakanai
Copy link
Author

hakanai commented Oct 5, 2016

Retested here since dependencies have changed for me too, but still happens as long as churn isn't disabled.

{"Ruby"=>
  {"Engine"=>"ruby",
   "Version"=>"2.3.1",
   "Patchlevel"=>112,
   "Ripper Support"=>true,
   "Rubygems Version"=>"2.5.1",
   "Long Description"=>
    "ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]"},
 "Environment"=>
  {"VERBOSE"=>"false",
   "External Encoding"=>"UTF-8",
   "Internal Encoding"=>"",
   "Host Architecture"=>"x86_64-apple-darwin15.4.0",
   "Ruby Prefix"=>"/Users/tester/DevEnv/rbenv/versions/2.3.1",
   "Ruby Options"=>"RUBYOPT=-rbundler/setup"},
 "MetricFu"=>
  {"Version"=>"4.12.0",
   "Verbose Mode"=>false,
   "Enabled Metrics"=>
    [:stats,
     :churn,
     :flay,
     :flog,
     :cane,
     :rails_best_practices,
     :reek,
     :roodi,
     :saikuro,
     :hotspots],
   "Dependencies"=>
    [{"name"=>"flay", "version"=>[">= 2.0.1", "~> 2.1"]},
     {"name"=>"churn", "version"=>["~> 0.0.35"]},
     {"name"=>"flog", "version"=>[">= 4.1.1", "~> 4.1"]},
     {"name"=>"reek", "version"=>["< 3.0", ">= 1.3.4"]},
     {"name"=>"cane", "version"=>[">= 2.5.2", "~> 2.5"]},
     {"name"=>"rails_best_practices", "version"=>[">= 1.14.3", "~> 1.14"]},
     {"name"=>"saikuro", "version"=>[">= 1.1.3", "~> 1.1"]},
     {"name"=>"roodi", "version"=>["~> 3.1"]},
     {"name"=>"code_metrics", "version"=>["~> 0.1"]},
     {"name"=>"redcard", "version"=>[">= 0"]},
     {"name"=>"coderay", "version"=>[">= 0"]},
     {"name"=>"multi_json", "version"=>[">= 0"]},
     {"name"=>"launchy", "version"=>["~> 2.0"]},
     {"name"=>"rcov", "version"=>["~> 0.8"]}]}}

@jkeam jkeam mentioned this issue Nov 3, 2016
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

3 participants