simplecov icon indicating copy to clipboard operation
simplecov copied to clipboard

coverage data provided by Coverage exceeds number of lines

Open dnagir opened this issue 14 years ago • 9 comments

> jruby -v
jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.6.0_29) [darwin-i386-java]

> bundle exec rspec spec/
Warning: coverage data provided by Coverage [40] exceeds number of lines in /Users/dnagir/proj/neo4j/spec/../lib/neo4j/core_ext/class/inheritable_attributes.rb [37]

There is a resolved issue, but it seems to be a different one.

Is there any way to fix it?

dnagir avatar Dec 14 '11 09:12 dnagir

I'm getting the same error on a half a dozen files or so. It just started yesterday after I did a gem update. Any ideas ? What do you need from me to diagnose? Thanks in advance

mpestritto avatar Jan 12 '12 17:01 mpestritto

Hey guys, unfortunately Jruby is not supported as the Coverage library there is not compatible with MRI 1.9's one. Check out #86 for further info.

colszowka avatar Jan 27 '12 14:01 colszowka

So do we just have to live with long lists of warnings on JRuby? Is there a way to (safely; that is, specifically this warning only) turn these warnings off, at least? See https://github.com/colszowka/simplecov/issues/86#issuecomment-15880858 (@BrandonMathis) for another report of this. Should I [...] EDIT: just remove that message output when defined?(JRUBY_VERSION) or could that mask real issues?: https://github.com/colszowka/simplecov/blob/03e5124fc4aeb2491ddab84f1e5c14a26f4de593/lib/simplecov/source_file.rb#L90 ? Thanks.

likethesky avatar May 29 '13 00:05 likethesky

I have the same problem with current jruby 1.7.10

Warning: coverage data provided by Coverage exceeds ...

x-itec avatar Mar 03 '14 23:03 x-itec

+1 for same problem jruby 1.7.12

moofish32 avatar Jul 15 '14 07:07 moofish32

+1 for same problem using ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]

timnovinger avatar Aug 01 '14 01:08 timnovinger

@x-itec @moofish32 This issue was closed on Jan 27, 2012 due to issues with JRuby that persist. See the above referenced issue #86

@timnovinger same points as above, except also

  1. I need more info.. are you perhaps using a preloader just as zeus or spring? (Are you on Rails 4?)
  2. Have you tried clearing your /coverage directory (or renaming it, and running again)?
  3. If that's not it, please create a new issue and see https://github.com/colszowka/simplecov/blob/master/CONTRIBUTING.md#reporting-issues

bf4 avatar Aug 01 '14 03:08 bf4

I can confirm that emptying the contents of your coverage folder will fix this problem.

rbwendt avatar Mar 29 '16 20:03 rbwendt

Seeing this in 2023 now after enabling enable_coverage_for_eval after support for eval coverage was introduced in version 0.22.0:

https://github.com/simplecov-ruby/simplecov/pull/1037

If I remove/disable enable_coverage_for_eval then these messages go away.

I'm adding it here as an easy reference point for others seeing this in the latest release.

joshuapinter avatar May 30 '23 14:05 joshuapinter