Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codecov can't understand Multiplatform + Multi-module #189

Closed
vitorhugods opened this issue Jun 14, 2022 · 3 comments
Closed

Codecov can't understand Multiplatform + Multi-module #189

vitorhugods opened this issue Jun 14, 2022 · 3 comments
Labels
Feature Feature request issue type Kover Coverage Tool

Comments

@vitorhugods
Copy link

The project I'm working on (Kalium) has multiple multi-platform modules.

So, the following file structure is quite common:

# Class Y has 3 sources
- moduleA/src/commonMain/kotlin/packageX/ClassY.kt
- moduleA/src/androidMain/kotlin/packageX/ClassY.kt
- moduleA/src/jvmMain/kotlin/packageX/ClassY.kt

The XML reports (both IntelliJ or Jacoco) only contain the package and file name.

So the reports say something along these lines: <class name="packageX/ClassY" sourcefilename=ClassY.kt>.

There is no information about moduleA or commonMain/androidMain. Codecov can't make the relation between the report and Git's source files.

Ideally the "class name" and packages in the report should have the name of the module and source set, so Codecov can understand it.

Something like:

`<class name="moduleA/commonMain/packageX/ClassY" sourcefilename=ClassY.kt>`
`<class name="moduleA/commonAndroid/packageX/ClassY" sourcefilename=ClassY.kt>`
`<class name="moduleB/commonAndroid/packageX/ClassY" sourcefilename=ClassY.kt>`

Am I missing a configuration, is there some setup missing on our end?

I am inclined to think this is what the ticket #16 is trying to say, maybe it just misses some details there.

I am willing to try contributing and implementing something like this.

@shanshin
Copy link
Collaborator

shanshin commented Jun 27, 2022

Hi,
thank you for the offer.
At the moment, we have not studied a specific problem when integrating with codecov (we will definitely study your proposal). The main problem is that we cannot change the contents of the XML report, because it corresponds to the JaCoCo format (in which name is the name of the class, and class names do not contain directory names).

If it is not possible to get around this problem by configuring codecov, we can add a new XML format, special for codecov, which differs in content from the JaCoCo format (this solution will only work for the IntelliJ engine).

@shanshin shanshin added Kover Coverage Tool Feature Feature request issue type labels Jun 27, 2022
@shanshin
Copy link
Collaborator

Duplicates #16

@shanshin
Copy link
Collaborator

Closed as a duplicate of #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature request issue type Kover Coverage Tool
Projects
None yet
Development

No branches or pull requests

2 participants