[erlang-patches] [PATCH] eunit: Format stacktraces with location information

Klas Johansson klas.johansson@REDACTED
Mon Feb 13 17:36:57 CET 2012


On Mon, Feb 13, 2012 at 10:43 AM, Richard Carlsson
<carlsson.richard@REDACTED> wrote:
> On 02/12/2012 06:51 PM, Klas Johansson wrote:
>>
>> Hi,
>>
>> I've noticed that eunit doesn't print stacktraces correctly since the
>> new format (with filenames and line numbers) was introduced in R15.
>> Here's a patch which addresses that.

Hi,

> Thanks. I modified the patch, because it needs to be backwards compatible as
> well.

I was thinking about that.  For the otp repo it doesn't have to be,
right? As long as the patch isn't applied to older branches - which it
doesn't have to be.  But for the separate eunit repo it's a different
story I assume, since it could be used both in R14 and in R15.
Supporting both formats at the same time should be safe I guess;
dialyzer can be an issue in those situations, but it should be safe
since it's an exported function -- dialyzer cannot complain too much
there can it.

> I also found that the stack pruning code (which removes internal eunit
> functions from the printed stack) had to be updated to know about the new
> format. You can look at it here:
>
>  https://github.com/richcarl/eunit/commits/new-stack-traces

Ah, missed that.

> Unless you find any mistakes, I'll merge it to the EUnit master branch and
> will bring it from there into OTP.

Sure, go ahead! :-)


BR,
Klas



More information about the erlang-patches mailing list