Hi,

On Monday, October 5, 2020 at 11:19:09 AM UTC+2 [email protected] wrote:

> Here is a project: https://github.com/dmurat/jacoco-groovy3-lambda-demo


Thank you for the example.
 

> Would you like me to file the issue too?
>

I have a feeling that issue or at least question should be raised on Groovy 
compiler side, because
in both cases Groovy compiler generates an additional class with a body of 
Closure/Lambda,

however this class in the case of new Java-like syntax is marked as 
synthetic - see ACC_SYNTHETIC in output of command
javap -v -p 
target/classes/org/jacoco/groovy/lambda/demo/GreeterDemo\$_greetFromLambda_lambda1.class

whereas is not marked in another case - see output of command
javap -v 
target/classes/org/jacoco/groovy/lambda/demo/GreeterDemo\$_greetFromClosure_closure2.class

If Groovy 3 compiler will not be marking class in the first case as 
synthetic,
consistently with how it does and was doing Groovy 2 compiler for the 
second case,
then JaCoCo without any changes will be showing coverage for the new 
Java-like syntax.
So that's why in my opinion will be valuable to receive an authoritative 
answer from developers of the Groovy compiler whether or not this can be 
done on their side.
And if not, then why and what will they advise for JaCoCo as a way to 
detect code of lambda expressions.


Regards,
Evgeny


Tnx
>
> On Sunday, October 4, 2020 at 5:56:46 PM UTC+2 Marc R. Hoffmann wrote:
>
>> Hi,
>>
>> we haven’t looked actively at Groovy 3 features. Can you provide a 
>> minimal demonstrator preferably based on Maven?
>>
>> Thanks,
>> -marc 
>>
>> On 4. Oct 2020, at 12:31, Damir Murat <[email protected]> wrote:
>>
>> Besides closures, Groovy 3 introduces support for Java-like lambda 
>> syntax. I noticed that Groovy lambdas are not covered in the JaCoCo 
>> coverage report. Is this a known limitation or maybe a bug? Tnx.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "JaCoCo and EclEmma Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jacoco/eaf82478-ff2e-4f39-be30-f022c0d3e117n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jacoco/eaf82478-ff2e-4f39-be30-f022c0d3e117n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/b976391f-9be1-416e-ad23-5a697d2ad822n%40googlegroups.com.

Reply via email to