Repository navigation
Closed
Milestone
Description
We changed our file format with the 0.18.0 release series - unfortunately our code still seems to want to read the old file format and then break ;) We gotta be more careful there. I don't think we need to be able to read all old versions of files but I think we should rather capture the error and continue without processing the old results (easiest to achieve I believe).
This is my preliminary diagnosis, problems goes away when deleting the coverage directory.
Reported by @klyonrad #781 (comment)
bundle show simplecov
/Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1
bundle show simplecov-html
/Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-html-0.11.0.beta1
bundle exec rspec spec/policies
Run options: exclude {:future=>true}
Randomized with seed 25469
237/237 |========================================== 100 ==========================================>| Time: 00:00:23
Finished in 23.37 seconds (files took 10.5 seconds to load)
237 examples, 0 failures
Randomized with seed 25469
Traceback (most recent call last):
15: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/defaults.rb:29:in `block in <top (required)>'
14: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov.rb:164:in `run_exit_tasks!'
13: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/configuration.rb:196:in `block in at_exit'
12: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov.rb:74:in `result'
11: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result_merger.rb:83:in `merged_result'
10: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result_merger.rb:57:in `results'
9: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result_merger.rb:57:in `each'
8: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result_merger.rb:58:in `block in results'
7: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result.rb:72:in `from_hash'
6: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result.rb:86:in `symbolize_names_of_coverage_results'
5: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result.rb:86:in `each_with_object'
4: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result.rb:86:in `each'
3: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result.rb:87:in `block in symbolize_names_of_coverage_results'
2: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result.rb:87:in `each_with_object'
1: from /Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result.rb:87:in `each'
/Users/username/.rvm/gems/ruby-2.6.5/gems/simplecov-0.18.0.beta1/lib/simplecov/result.rb:88:in `block (2 levels) in symbolize_names_of_coverage_results': undefined method `to_sym' for 1:Integer (NoMethodError)
Did you mean? to_s
Metadata
Metadata
Assignees
Labels
No labels
Activity
PragTob commentedon Jan 15, 2020
fix-crash-against-old-resultset-jsonhas a scenario aimed at reproducing this.Right now it's incomplete because of:
If
store_resultis executed before the result merging then this bug doesn't trigger. So gotta makeresult?be false in the scenario :)PragTob commentedon Jan 15, 2020
WIP fix/reproduction is up at #824
Reproduce #820 - crash when running with an old resultset.json
Reproduce #820 - crash when running with an old resultset.json
Reproduce #820 - crash when running with an old resultset.json
PragTob commentedon Jan 19, 2020
Fixed in #824