You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Damir Murat <da...@gmail.com> on 2020/10/05 11:00:34 UTC

Groovy 3 lambdas are not covered by JaCoCo

I noticed that JaCoCo does not include in the coverage report Groovy 3 lambdas (contrary to closures).
After asking on the JaCoCo group, the JaCoCo maintainer suggested me to ask on the Groovy side.

The problem is that the generated class for lambda is marked as synthetic, which is not the case for the closure class.
Here is a full discussion: https://groups.google.com/g/jacoco/c/MR4mrJB-kVE

Is it possible to remove that synthetic modifier?

Tnx

Re: Groovy 3 lambdas are not covered by JaCoCo

Posted by Damir Murat <da...@gmail.com>.
Sure, here it is: https://issues.apache.org/jira/browse/GROOVY-9770


Re: Groovy 3 lambdas are not covered by JaCoCo

Posted by Paul King <pa...@asert.com.au>.
That does indeed look wrong. It would be great if you can raise an issue in
Jira.

We set that modifier here:
https://github.com/apache/groovy/blob/master/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesLambdaWriter.java#L119
but I don't believe it is necessary.

Cheers, Paul.


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Oct 5, 2020 at 9:00 PM Damir Murat <da...@gmail.com> wrote:

> I noticed that JaCoCo does not include in the coverage report Groovy 3
> lambdas (contrary to closures).
> After asking on the JaCoCo group, the JaCoCo maintainer suggested me to
> ask on the Groovy side.
>
> The problem is that the generated class for lambda is marked as synthetic,
> which is not the case for the closure class.
> Here is a full discussion:
> https://groups.google.com/g/jacoco/c/MR4mrJB-kVE
>
> Is it possible to remove that synthetic modifier?
>
> Tnx
>