Did Something Changed Again in Spec

RCov is partially written in C, so of course it is not supported yet.

I asked about that earlier, as well, and got the response that it is not
covered. I believe one of the goals post-1.0 is to get Ruby FFI working.
If
you’d like to see RCov working, you might write a patch to move RCov to
Ruby
FFI so that it will work on IronRuby once FFI support is working. And if
you
get that done, you might even be able to pitch in with the FFI
implementation. I, for one, would appreciate it. :slight_smile: Of course, I could
do
those, too, but I’m working on a few other things, atm. :slight_smile:

Ryan R.

Email: [email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/

How does implementing FFI provide code coverage for the CLR, isn’t that
mutually exclusive? Shouldn’t FFI provide us with a way to use C-based
extensions? But C-based extensions won’t know about the ironruby
internals
etc. Just thinking out loud so feel free to correct me :slight_smile:

Also aren’t the stacks produced by IronRuby a little different from the
stacks produced by MRI for example.

To get code coverage for the CLR is that again the CLR profiling API you
would leverage? could somebody point me in the right direction?

Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)

You’re correct Ivan. Today RCov isn’t even supported on IronRuby because
it uses a small c-extension. As Shri said previously, it’d be great if
someone could remove the dependency on the C-extension (easiest way is
to write the equivalent Ruby code … what Ryan is suggesting is a better
way-long-term goal for IronRuby to be compatible with FFI-based
extensions), and then RCov would work for code coverage of only ruby
code. Now, imagine that was done, and it was called ironruby-rcov … this
wouldn’t work for code coverage of your .NET code, so you’ll have to use
the CLR code coverage tools. Only at that point could you think about
add CLR support to ironruby-rcov.

Make sense now?

~Jimmy

From: [email protected]
[mailto:[email protected]] On Behalf Of Ivan Porto
Carrero
Sent: Tuesday, January 26, 2010 1:08 AM
To: [email protected]
Subject: Re: [Ironruby-core] Did Something Changed Again in Spec…

How does implementing FFI provide code coverage for the CLR, isn’t that
mutually exclusive? Shouldn’t FFI provide us with a way to use C-based
extensions? But C-based extensions won’t know about the ironruby
internals etc. Just thinking out loud so feel free to correct me :slight_smile:

Also aren’t the stacks produced by IronRuby a little different from the
stacks produced by MRI for example.

To get code coverage for the CLR is that again the CLR profiling API you
would leverage? could somebody point me in the right direction?

Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)

On Tue, Jan 26, 2010 at 6:02 AM, Ryan R.
<[email protected]mailto:[email protected]> wrote:
I asked about that earlier, as well, and got the response that it is not
covered. I believe one of the goals post-1.0 is to get Ruby FFI working.
If you’d like to see RCov working, you might write a patch to move RCov
to Ruby FFI so that it will work on IronRuby once FFI support is
working. And if you get that done, you might even be able to pitch in
with the FFI implementation. I, for one, would appreciate it. :slight_smile: Of
course, I could do those, too, but I’m working on a few other things,
atm. :slight_smile:

Ryan R.

Email: [email protected]mailto:[email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/

On Mon, Jan 25, 2010 at 2:15 PM, Mohammad A.
<[email protected]mailto:[email protected]> wrote:
I was trying to make ironruby to perform code coverage for a .NET
assembly using rcov but it seems like it is not currently supported
yet…


Posted via http://www.ruby-forum.com/.


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

What Jimmy said. :smiley:

Ryan R.

Email: [email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/

On Tue, Jan 26, 2010 at 3:17 AM, Jimmy S. <

Also, I think Ruby’s FFI is relatively new and not in great use, atm, so
even adding FFI to IronRuby wouldn’t do a whole lot to enable the C
extensions of most Ruby libraries until those are ported to use FFI. Is
that
right?

Ryan R.

Email: [email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/

On Tue, Jan 26, 2010 at 3:17 AM, Jimmy S. <

rcov has a pure ruby variant too IIRC. And for the sake of this
discussion
let’s just say that that works as is with IronRuby.

Then I’d be looking at the CLR profiling api again isn’t it.
And to enable that profiling API don’t I have to instrument my dll with
some
constants so it knows it’s going to be profiled?

Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)

On Tue, Jan 26, 2010 at 10:17 AM, Jimmy S. <

On Tue, Jan 26, 2010 at 3:36 AM, Ivan Porto C.
[email protected]wrote:

rcov has a pure ruby variant too IIRC. And for the sake of this discussion
let’s just say that that works as is with IronRuby.

Then I’d be looking at the CLR profiling api again isn’t it.
And to enable that profiling API don’t I have to instrument my dll with
some constants so it knows it’s going to be profiled?

If that’s true, then we could start looking into making it work with
.dlls.
What we may find is something similar to the mocking story: writing a
new
one is just easier and makes more sense, e.g. caricature. RCov may turn
out
to be useful only for Ruby apps and too difficult to make work with
anything
else.

Here’s an InfoQ link on some of the progress made by JRuby (and
Rubinius’
FFI): JRuby Roundup: 1.1.3, rcov4jr, Rubinius MVM and FFI
This
might be helpful if we decide to attempt a straight port with C#
extensions.

Ryan R.

Email: [email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/

Any particular reason you aren’t using NCover or Clover? I’m not sure
generating coverage reports via rcov (even if it existed for the CLR)
for dlls written in C# would actually produce anything usable.

Cheers,
Sidu.

http://twitter.com/ponnappa

Ivan, no, you do not need to instrument your dll to use the profiling
APIs. Instead, you have to set an environment variable called
COR_PROFILER. Setting Up a Profiling Environment - .NET Framework | Microsoft Learn has
more info.

From: [email protected]
[mailto:[email protected]] On Behalf Of Ryan R.
Sent: Tuesday, January 26, 2010 5:51 AM
To: [email protected]
Subject: Re: [Ironruby-core] Did Something Changed Again in Spec…

On Tue, Jan 26, 2010 at 3:36 AM, Ivan Porto C.
<[email protected]mailto:[email protected]> wrote:
rcov has a pure ruby variant too IIRC. And for the sake of this
discussion let’s just say that that works as is with IronRuby.

Then I’d be looking at the CLR profiling api again isn’t it.
And to enable that profiling API don’t I have to instrument my dll with
some constants so it knows it’s going to be profiled?

If that’s true, then we could start looking into making it work with
.dlls. What we may find is something similar to the mocking story:
writing a new one is just easier and makes more sense, e.g. caricature.
RCov may turn out to be useful only for Ruby apps and too difficult to
make work with anything else.

Here’s an InfoQ link on some of the progress made by JRuby (and
Rubinius’ FFI):
JRuby Roundup: 1.1.3, rcov4jr, Rubinius MVM and FFI This
might be helpful if we decide to attempt a straight port with C#
extensions.

Ryan R.

Email: [email protected]mailto:[email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/

I’ve worked with the COR_PROFILER a little bit before… I’ll look if
it’s possible from IronRuby :slight_smile:

copy C:\ironruby\lib\ironruby\gems\bin\spec C:\ironruby\bin\ispec
copy C:\ironruby\lib\ironruby\gems\bin\spec.bat C:\ironruby\bin\ispec.bat

On my machine (in case it’s useful to someone else), here are the paths
and
instructions for rspec

– Thibaut

you don’t need to do that anymore :slight_smile:

At least not for the ironruby that is on github and built from source

there the instructions become:

ir -S gem install rspec

run specs:
ir -S spec spec/**/*_spec.rb


Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)

On Mon, Feb 1, 2010 at 12:39 PM, Thibaut Barrère

Can we move forward to solve the problem instead of mocking?

I would expect you would have better success moving forward if you did
not
make inflammatory statements such as these:

“This is a big defect in the IronRuby. Too many configurations will
scare developers away.”

"Not many people are willing to try out IronRuby because of
configuration
issues. "

“You are NOT thinking throughly about the problem!”

“I am not trying to put down IronRuby but sorry this is not going to
work in
the real world.”

It is clear that you believe IronRuby is too hard to configure, and I’ve
no
doubt that you are feeling some pain. Please try not to make exaggerated
statements saying things are universally broken and unacceptable just
because you are not able to solve something.

Thanks, Orion

you don’t need to do that anymore :slight_smile:

At least not for the ironruby that is on github and built from source

there the instructions become:

ir -S gem install rspec

run specs:
ir -S spec spec/**/*_spec.rb

thanks for the trick, that’s good to hear (although I mostly use MSI
releases these days, doing client work).

– Thibaut