Extension fuctions with lambda is imposible to cover

116 views
Skip to first unread message

Raúl Rodríguez

unread,
May 28, 2021, 10:37:47 AM5/28/21
to JaCoCo and EclEmma Users
Hi everyone,

We have a problem with the coverage, everithing extension functions with lambda is imposible to cover for example

CoroutineScope.launch

Always is partiatly covered, how we fix it? Any ideas?

Thanks

Raúl Rodríguez

unread,
May 28, 2021, 10:43:05 AM5/28/21
to JaCoCo and EclEmma Users

BTW We are using the last version 0.8.7 and this is hapening with our custom extensions too

Evgeny Mandrikov

unread,
May 28, 2021, 11:07:49 AM5/28/21
to jac...@googlegroups.com
On Fri, May 28, 2021 at 4:37 PM Raúl Rodríguez <rau...@gmail.com> wrote:
Hi everyone,

We have a problem with the coverage, everithing extension functions with lambda is imposible to cover for example

CoroutineScope.launch

Always is partiatly covered, how we fix it? Any ideas?

Hi,

This sounds similar to https://github.com/jacoco/jacoco/issues/1126 that was resolved in version 0.8.7

On Fri, May 28, 2021 at 4:43 PM Raúl Rodríguez <rau...@gmail.com> wrote:

BTW We are using the last version 0.8.7 and this is hapening with our custom extensions too
 
Given that the above ticket was resolved in 0.8.7,
it is unlikely that somebody will be able to blindly guess what is happening in your case without complete example,
so please provide a complete example demonstrating your difficulty that can be tried by others.

Also note that some people report that for version update they had to change multiple places in a different manneir - https://github.com/jacoco/jacoco/issues/1155#issuecomment-832678373
so without concrete complete example, one can only suggest you to make sure that you really use 0.8.7


Regards,
Evgeny

Raúl Rodríguez

unread,
May 31, 2021, 6:00:12 AM5/31/21
to JaCoCo and EclEmma Users
We have forced the last version with this and works fine the report, but when we execute the app get a crash 

 java.lang.RuntimeException: Failed to initialize JaCoCo.
     Caused by: java.io.FileNotFoundException: /jacoco.exec (Read-only file system)

subprojects {
    configurations.all {
           resolutionStrategy {
                 eachDependency { details ->
                     if ('org.jacoco' == details.requested.group) {
                    details.useVersion "0.8.7"
       }
      }
     }
   }
}
    

Evgeny Mandrikov

unread,
May 31, 2021, 6:57:12 AM5/31/21
to JaCoCo and EclEmma Users
On Monday, May 31, 2021 at 12:00:12 PM UTC+2 rau...@gmail.com wrote:
We have forced the last version with this and works fine the report,

Does the above statement mean that
you confirm that your original problem with "CoroutineScope.launch" was indeed related to https://github.com/jacoco/jacoco/issues/1126
and thus was solved, when you really used JaCoCO 0.8.7 ? 
 
but when we execute the app get a crash 

 java.lang.RuntimeException: Failed to initialize JaCoCo.
     Caused by: java.io.FileNotFoundException: /jacoco.exec (Read-only file system)

I believe that you'll find solution for this FileNotFoundException in
 

Regards,
Evgeny

Reply all
Reply to author
Forward
0 new messages