caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David MENTRÉ" <dmentre@linux-france.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] [ANN] Bisect_ppx 1.0.0 – Modernized code coverage for OCaml
Date: Fri, 12 Feb 2016 07:44:53 +0100	[thread overview]
Message-ID: <56BD7F65.1050909@linux-france.org> (raw)
In-Reply-To: <5F24126F-5082-42B8-9FCF-87F924892CA5@yahoo.com>

Hello Anton,

Thank you for your detailed explanations.

Le 2016-02-10 20:27, Anton Bachin a écrit :
>> * l. 110, 'f x' is not green? 'f' seems to be called if the previous "try" is green.
>> >   https://rleonid.github.io/bisect_ppx/coverage/file0004.html#L110
> The “f x” in try is evaluated if and only if the whole try-expression is
> evaluated – unless, perhaps, the *implementation* of exception handling can
> cause a memory or stack overflow exception to occur between these two points –
> can someone knowledgeable comment? However, assuming my previous statement is
> correct, it’s not necessary to have a mark in both places. We chose to put the
> mark on “try” because it is technically very slightly easier to do so. However,
> we could be convinced to move it to the expression instead.

Well I would have marked the "f x". My reasoning is simple, if f is
executed, it should be green. And f is more important than try regarding
coverage.


>> > Overall, I would expect all code lines to be either green, red or yellow, not without colour (except for comments and type and exception definitions).
> Bisect_ppx colors expressions and not lines – the line colors just indicate
> whether there is a colored expression on each line. So, yes, while many lines in
> expressions should be colored, some won’t be – for example, from above, lines
> containing only delimiters such as “then”, “else”, and “end”.

Two remarks:

 * If expressions are marked (which I suspected), then the HTML output
should color at expression granularity level and not line granularity
level. Therefore you would have only green or red and never orange[1]
(which would be simpler and clearer);

 * You could do some post-processing to look for such keywords as
“then”, “else”, and “end” and color them accordingly. It might be more a
hack than a clean approach, but I think it would make the output more
readable.

All that said, I'm not using your tool (for now), so I would understand
that you not take my remarks into account. ;-)

Best regards,
david

[1] Or maybe only in the summary on the left side of file display.


  reply	other threads:[~2016-02-12  6:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 15:33 Anton Bachin
2016-02-10 16:46 ` David MENTRE
2016-02-10 19:27   ` Anton Bachin
2016-02-12  6:44     ` David MENTRÉ [this message]
2016-02-12  9:18       ` Anton Bachin
2016-02-10 19:00 ` Gerd Stolpmann
2016-02-10 19:23   ` Gabriel Scherer
2016-02-10 19:33     ` Anton Bachin
2016-02-10 21:48       ` Gerd Stolpmann
2016-02-10 21:49       ` Alain Frisch
2016-02-11  1:16         ` Anton Bachin
2016-02-11 10:42           ` Gerd Stolpmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56BD7F65.1050909@linux-france.org \
    --to=dmentre@linux-france.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).