You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NaN FloatDomainError after upgrading to 0.14.0 #563
After upgrading to 0.14.0, I receive the following error after my tests run, presumably while the SimpleCov report is being generated:
vendor/bundle/gems/simplecov-0.14.0/lib/simplecov/source_file.rb:193:in `round': NaN (FloatDomainError)
from vendor/bundle/gems/simplecov-0.14.0/lib/simplecov/source_file.rb:193:in `round_float'
from vendor/bundle/gems/simplecov-0.14.0/lib/simplecov/source_file.rb:130:in `covered_strength'
from vendor/bundle/gems/simplecov-0.14.0/lib/simplecov/file_list.rb:56:in `block in covered_strength'
from vendor/bundle/gems/simplecov-0.14.0/lib/simplecov/file_list.rb:56:in `map'
from vendor/bundle/gems/simplecov-0.14.0/lib/simplecov/file_list.rb:56:in `covered_strength'
from (erb):7:in `formatted_file_list'
from ~/.rbenv/versions/2.3.0/lib/ruby/2.3.0/erb.rb:864:in `eval'
from ~/.rbenv/versions/2.3.0/lib/ruby/2.3.0/erb.rb:864:in `result'
from vendor/bundle/gems/simplecov-html-0.10.0/lib/simplecov-html.rb:66:in `formatted_file_list'
from (erb):21:in `block in format'
Downgrading to 0.13.0 resolved the issue for me. I'm on Ruby 2.3.0, Rails 4.2.5.
Argh jeez, I knew this was gonna happen some day! Thanks for the report ❤️
So this error happens here - if you could give me the values of float and places in that part (by inserting a puts on your end there) that'd be amazing and helpful in tracking down the error source.
If you had something that reproduces, even better but that'll help get me started :)
I won't get to it today (am at work and have evening plans) but will try to make and publish a fix over the weekend.
@stevehanson I'm on fixing this right now. No idea how NaN gets there... I identified the commit that is likely responsible (b35f569) and am cooking up a fix right now. It catches the 0.0 case, not the NaN one but I'll see... opening a PR soon
Activity
PragTob commentedon Mar 17, 2017
Argh jeez, I knew this was gonna happen some day! Thanks for the report ❤️
So this error happens here - if you could give me the values of
floatandplacesin that part (by inserting a puts on your end there) that'd be amazing and helpful in tracking down the error source.If you had something that reproduces, even better but that'll help get me started :)
I won't get to it today (am at work and have evening plans) but will try to make and publish a fix over the weekend.
Sorry for the inconvenience!
chief commentedon Mar 17, 2017
Same here (got Infinity error)
stevehanson commentedon Mar 17, 2017
@PragTob No worries! It took me all of a couple minutes to downgrade the gem and move on, so no big deal.
Here is the
putsoutput forfloat, placeswhen I run a test. Let me know if I can do anything else to help, but no urgency on my end.PragTob commentedon Mar 17, 2017
@stevehanson I'm on fixing this right now. No idea how
NaNgets there... I identified the commit that is likely responsible (b35f569) and am cooking up a fix right now. It catches the0.0case, not the NaN one but I'll see... opening a PR soonstevehanson commentedon Mar 17, 2017
@PragTob cool. Feel free to ping me when you get the PR up, and I can test it out if you'd like.
PragTob commentedon Mar 17, 2017
@stevehanson that's the idea, hope and intention. Thanks :)
Try at fixing FloatDomainError more closely restoring origin version
PragTob commentedon Mar 18, 2017
Fixed in 0.14.1 - thanks everyone
Update ruby-simplecov to 0.14.1.
Update ruby-simplecov to 0.14.1.
Update ruby-simplecov to 0.14.1.
Update ruby-simplecov to 0.14.1.