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

Is there a blocker on using the new ruby_parser (not locking the gem at ~>2.3)? #15

Closed
bf4 opened this issue Jan 2, 2013 · 4 comments
Closed
Assignees

Comments

@bf4
Copy link
Contributor

bf4 commented Jan 2, 2013

Is there a blocker on using the new ruby_parser (not locking the gem at ~>2.3)?

@ghost ghost assigned danmayer Jan 3, 2013
@danmayer
Copy link
Owner

danmayer commented Jan 3, 2013

What version are you trying to get to... I just tried updating all the way to the latest, and noticed that causes errors with the current code. I could likely fix the code and update to a newer version, just not sure who might care about the old versions, but I guess they could just use the old version of churn if they needed.

I would be happy to update, if it makes it more compatible with some of the other metric tools. It looks like the break occurs when moving from sexp 4.0.X to 4.1.0, so you basically just want me to do full version bumps

gem.add_dependency "sexp_processor", '> 4.1.0'
gem.add_dependency "ruby_parser", '
> 3.1.0'

I likely won't have time to fix this until the weekend...

  1. Error:
    test: LocationMapping should location_mapping gets correct classes info. (LocationMappingTest):
    NotEmptyError: exp not empty after Churn::LocationMapping.process_defn on s(s(:iasgn, :@minimum_churn_count, s(:iter, s(:call, s(:lvar, :options), :fetch, s(:lit, :minimum_churn_count)), s(:args), s(:lit, 5))), s(:call, nil, :puts, s(:lvar, :start_date)), s(:if, s(:call, s(:call, s(:self), :class), :git?), s(:iasgn, :@source_control, s(:call, s(:const, :GitAnalyzer), :new, s(:lvar, :start_date))), s(:if, s(:call, s(:const, :File), :exist?, s(:str, ".svn")), s(:iasgn, :@source_control, s(:call, s(:const, :SvnAnalyzer), :new, s(:lvar, :start_date))), s(:call, nil, :raise, s(:str, "Churning requires a subversion or git repo")))), s(:iasgn, :@revision_changes, s(:hash)), s(:iasgn, :@method_changes, s(:hash)), s(:iasgn, :@class_changes, s(:hash)))
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:134:in assert_empty' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:228:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:340:in in_context' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:194:inprocess'
    /Users/danmayer/projects/churn/test/../lib/churn/location_mapping.rb:37:in analyze_list' /Users/danmayer/projects/churn/test/../lib/churn/location_mapping.rb:32:inprocess_class'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:218:in send' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:218:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:275:in error_handler' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:217:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:340:in in_context' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:194:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:236:in process' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:275:inerror_handler'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:235:in process' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:340:inin_context'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:194:in process' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:236:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:275:in error_handler' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:235:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:340:in in_context' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:194:inprocess'
    /Users/danmayer/projects/churn/test/../lib/churn/location_mapping.rb:20:in get_info' /Users/danmayer/projects/churn/test/unit/location_mapping_test.rb:13:in**bind_1357185065_340352'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/context.rb:382:in call' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/context.rb:382:intest: LocationMapping should location_mapping gets correct classes info. '
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/mocha-0.9.12/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:22:in __send**' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/mocha-0.9.12/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:22:in run'

  2. Error:
    test: LocationMapping should location_mapping gets correct methods info. (LocationMappingTest):
    NotEmptyError: exp not empty after Churn::LocationMapping.process_defn on s(s(:iasgn, :@minimum_churn_count, s(:iter, s(:call, s(:lvar, :options), :fetch, s(:lit, :minimum_churn_count)), s(:args), s(:lit, 5))), s(:call, nil, :puts, s(:lvar, :start_date)), s(:if, s(:call, s(:call, s(:self), :class), :git?), s(:iasgn, :@source_control, s(:call, s(:const, :GitAnalyzer), :new, s(:lvar, :start_date))), s(:if, s(:call, s(:const, :File), :exist?, s(:str, ".svn")), s(:iasgn, :@source_control, s(:call, s(:const, :SvnAnalyzer), :new, s(:lvar, :start_date))), s(:call, nil, :raise, s(:str, "Churning requires a subversion or git repo")))), s(:iasgn, :@revision_changes, s(:hash)), s(:iasgn, :@method_changes, s(:hash)), s(:iasgn, :@class_changes, s(:hash)))
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:134:in assert_empty' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:228:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:340:in in_context' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:194:inprocess'
    /Users/danmayer/projects/churn/test/../lib/churn/location_mapping.rb:37:in analyze_list' /Users/danmayer/projects/churn/test/../lib/churn/location_mapping.rb:32:inprocess_class'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:218:in send' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:218:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:275:in error_handler' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:217:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:340:in in_context' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:194:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:236:in process' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:275:inerror_handler'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:235:in process' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:340:inin_context'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:194:in process' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:236:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:275:in error_handler' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:235:inprocess'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:340:in in_context' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/sexp_processor-4.1.3/lib/sexp_processor.rb:194:inprocess'
    /Users/danmayer/projects/churn/test/../lib/churn/location_mapping.rb:20:in get_info' /Users/danmayer/projects/churn/test/unit/location_mapping_test.rb:21:in**bind_1357185065_405043'
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/context.rb:382:in call' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/shoulda-2.11.3/lib/shoulda/context.rb:382:intest: LocationMapping should location_mapping gets correct methods info. '
    /Users/danmayer/projects/churn/specs/ruby/1.8/gems/mocha-0.9.12/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:22:in __send**' /Users/danmayer/projects/churn/specs/ruby/1.8/gems/mocha-0.9.12/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:22:in run'

@bf4
Copy link
Contributor Author

bf4 commented Jan 3, 2013

Thanks for looking at that. I'm working on https://github.com/metricfu/metric_fu and want to 'put the band back together', which includes updating the dependencies of the dependencies, and it looks like you're still actively developing on this. I don't know if it might be helpful, but the brakeman project has a ruby_parser / sexp_processor compatibility layer. (written before ruby_parser reach full 1.9 compliance in the 3.0 release)

@bf4 bf4 closed this as completed Jan 3, 2013
@danmayer
Copy link
Owner

danmayer commented Jan 4, 2013

Cool I will look at the brakeman project. I figured this was for metric_fu updates. Very cool that you are working on that. I will dig in a bit this weekend and hopefully get a gem update released for you.

peace,
Dan

@danmayer
Copy link
Owner

danmayer commented Jan 5, 2013

OK so I bumped the version of churn and updated the ruby_parser and sexp_processor dependancies

https://rubygems.org/gems/churn

Let me know if any of the other old gems are causing issues.

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