When I run rcov using jruby, my reports contain all of the jruby core
classes along with strange classes like (eval),
(recognized_optimized), (erb), and others. The same thing does not
occur when i switch over to c ruby. Anyone else have this
experience? I tried explicitly including the app directory with “–
include app” but this doesn’t seem to help eliminate the extra
libraries.
The why is a little involved. in generating code using eval, jruby
creates filenames like you mentioned and the way these files get
generated triggers teh RCov hooks and RCov says “Oh here are some more
files” and adds them to the list of files being monitored.
I was thinking of automatically opting out on some of these files but
I don’t have a complete list of them yet (I can pull most of em out of
the jruby source tho). I am also trying to track down(although I
haven’t had much time lately) an issue with how RCov reports coverage
on partials in rails. And I’m not convinced the 2 are unrelated yet.
In rails projects I’ve tested RCov with Rcov reports coverage of
partials in jruby but not in ruby.
So I guess the answer is … I want to clean that stuff up. I have
cleared some time next week to work on these issues so I’ll keep you
posted.
In my opinion I Like seeing this code. I think opting out of seeing
this code in your RCov reports is better (or making RCov by default
not include them) I suspect that this is what let’s me see coverage
of rails partials in my Jruby on Rails app (I don’t see it in MRI).
Just my 0.02
Jay
On Tue, Mar 2, 2010 at 2:53 PM, Charles Oliver N. [email protected] wrote:
on partials in rails. And I’m not convinced the 2 are unrelated yet.
On Thu, Feb 18, 2010 at 7:18 AM, Jay McGaffigan [email protected]
wrote:
In rails projects I’ve tested RCov with Rcov reports coverage of
partials in jruby but not in ruby.
So I guess the answer is … I want to clean that stuff up. Â I have
cleared some time next week to work on these issues so I’ll keep you
posted.
Is this something we shouldn’t be doing in JRuby? For example, should
we not be tracing code within evals?
To be honest, the JRuby behavior seems more correct, since we’re
showing all code, even if it’s “anonymous”. But if there’s something
we should or should not be doing, please let me know. (and of course I
know you will)
Charlie
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.