Hi Justin,

exactly. If the package name is io.elephant.octopus JaCoCo will look for the 
source at  the folder io/elephant/octopus. As JaCoCo is not parsing source 
files we cannot support this feature of the Kotlin compiler.

Here is the open feature request with some background information: 
https://github.com/jacoco/jacoco/issues/939

Regards,
-marc

> On 19. Sep 2022, at 18:36, Justin Kolich <[email protected]> wrote:
> 
> Marc,
> 
> Thank you for the help and I think I'm starting to understand. In my project 
> I have a file called users.kt that can be found in src/main/kotlin/octopus, 
> but the first line in users.kt is "package io.elephant.octopus". Would it be 
> necessary for me to change the source tree to include Io and elephant folders?
> 
> Thank you,
> 
> Justin Kolich
> 
> On Friday, September 16, 2022 at 10:48:52 AM UTC-7 Marc R. Hoffmann wrote:
> Hi Justin,
> 
> if you get coverage figures the only problem is what the error message is: 
> Source files cannot be found to render highlighted source code. Maybe you 
> stepped in the following limitation with Kotlin: 
> https://github.com/jacoco/jacoco/issues/939 
> <https://github.com/jacoco/jacoco/issues/939>
> 
> JaCoCo expects source files to be in folders with the full package hierarchy. 
> Leaving out parent folders like Kotlin compiler allows is not supported by 
> JaCoCo.
> 
> Regards,
> -marc
> 
> 
>> On 16. Sep 2022, at 18:36, Justin Kolich <[email protected] 
>> <applewebdata://E260479B-6FB2-4994-8D68-056CC251EE75>> wrote:
>> 
> 
>> I am working on a project in Kotlin using gradle. When running Jacoco I can 
>> see the code coverage of each function, but the feature where you can see a 
>> line by line analysis will not cooperate with me. 
>> 
>> The top of my html page says "Source file {FILE LOCATION} was not found 
>> during generation of report" however the top right section where you can see 
>> source files shows the file that I'm looking for. This means that the source 
>> file has to be found at some point, but is it being found too late in the 
>> process? I have seen some people say its because the project isn't ran in 
>> debug mode, but I have no clue how to get that set up.
>> 
>> Any help is appreciated! 
>> 
> 
>> -- 
>> 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] 
>> <applewebdata://E260479B-6FB2-4994-8D68-056CC251EE75>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jacoco/0be709e5-7593-45c7-98fd-91869fac62e7n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jacoco/0be709e5-7593-45c7-98fd-91869fac62e7n%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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/0168dbdd-1451-4d51-97e3-3692dd1f3d64n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/0168dbdd-1451-4d51-97e3-3692dd1f3d64n%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/5BE9C1AD-744C-4339-AAF1-49D86273BCA9%40mountainminds.com.

Reply via email to