stratify icon indicating copy to clipboard operation
stratify copied to clipboard

Improved tracebacks

Open daemianmack opened this issue 11 years ago • 5 comments

I found the culprit swallowing collector tracebacks: https://github.com/rails/rails/blob/master/railties/lib/rails/backtrace_cleaner.rb#L14

daemianmack avatar Aug 11 '12 21:08 daemianmack

Thanks, Daemian. I hope to review and merge this pull request and the previous one within the next few weeks.

jasonrudolph avatar Aug 11 '12 22:08 jasonrudolph

Sure! Sorry about the commit spam here -- forgot I did the last change against my master branch instead of a proper feature branch.

daemianmack avatar Aug 11 '12 23:08 daemianmack

Thanks again for the patch. I tested this out locally, but the new spec fails with the following output:

$ bundle exec rake
...

Failures:

  1) backtrace initializer preserves Stratify gems in the backtrace
     Failure/Error: expect {archiver.run}.to raise_error { |e|
       undefined method `include?' for nil:NilClass
     # ./spec/lib/backtrace/backtrace_spec.rb:7:in `block (2 levels) in <top (required)>'

Finished in 0.67077 seconds
38 examples, 1 failure

Failed examples:

rspec ./spec/lib/backtrace/backtrace_spec.rb:4 # backtrace initializer preserves Stratify gems in the backtrace
rake aborted!
/Users/jason/.rvm/rubies/ruby-1.9.3-p125/bin/ruby -S rspec ./spec/controllers/activities_controller_spec.rb ./spec/controllers/application_controller_spec.rb ./spec/controllers/collectors_controller_spec.rb ./spec/helpers/activities_helper_spec.rb ./spec/helpers/collectors_helper_spec.rb ./spec/integration/manage_activities_spec.rb ./spec/integration/manage_collectors_spec.rb ./spec/integration/view_graphs_spec.rb ./spec/lib/backtrace/backtrace_spec.rb ./spec/lib/punch_card_graph/timestamp_grid_spec.rb ./spec/presenters/punch_card_graph_presenter_spec.rb ./spec/views/collectors/_form.html.erb_spec.rb failed

Does it pass for you?

jasonrudolph avatar Aug 22 '12 00:08 jasonrudolph

I think I might be content just running with the silencers removed. I'm going to uncomment this line and run like that in production for a while. My hunch is that the backtraces will be more useful than noisy. But, we'll see. I'll run that way for while and then decide whether that's sufficient.

jasonrudolph avatar Aug 22 '12 00:08 jasonrudolph

I haven't had a chance yet to dig into why, but the test passes when using a relative path in Gemfile to the stratify-base gem (the conditions under which I wrote the test), and fails with the misbehavior you post when referencing stratify-base out of the more-usual system/rvm/rbenv gem location.

daemianmack avatar Aug 23 '12 01:08 daemianmack