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

Fix parsing of SMAP for Kotlin 1.5 #1164

Merged
merged 3 commits into from Mar 16, 2021
Merged

Fix parsing of SMAP for Kotlin 1.5 #1164

merged 3 commits into from Mar 16, 2021

Conversation

Godin
Copy link
Member

@Godin Godin commented Mar 15, 2021

Fixes #1155

@Godin Godin added this to To Do in Filtering via automation Mar 15, 2021
@Godin Godin added this to Implementation in Current work items via automation Mar 15, 2021
@Godin Godin added this to the 0.8.7 milestone Mar 15, 2021
@Godin Godin self-assigned this Mar 15, 2021
@Godin Godin added the type: bug 🐛 Something isn't working label Mar 16, 2021
@Godin Godin moved this from Implementation to Review in Current work items Mar 16, 2021
@Godin Godin marked this pull request as ready for review March 16, 2021 10:14
@Godin Godin requested a review from marchof March 16, 2021 10:15
@marchof
Copy link
Member

marchof commented Mar 16, 2021

@Godin Same question: Do we have a failing validation test with Kotlin 1.5 (without this fix)?

@Godin
Copy link
Member Author

Godin commented Mar 16, 2021

@marchof and the same answer 😄 yes, we already have validation test, otherwise I would add one 😉 but thank you for double-checking 👍

Before this change when executing

mvn clean package -Dkotlin.version=1.5.0-M1

we'll get

Tests in error:
  execute_assertions_in_comments(org.jacoco.core.test.validation.kotlin.KotlinInlineTest): Error while analyzing org/jacoco/core/test/validation/kotlin/targets/KotlinInlineTarget.
  all_branches_should_have_line_number(org.jacoco.core.test.validation.kotlin.KotlinInlineTest): Error while analyzing org/jacoco/core/test/validation/kotlin/targets/KotlinInlineTarget.
  all_missed_instructions_should_have_line_number(org.jacoco.core.test.validation.kotlin.KotlinInlineTest): Error while analyzing org/jacoco/core/test/validation/kotlin/targets/KotlinInlineTarget.
  last_line_in_coverage_data_should_be_less_or_equal_to_number_of_lines_in_source_file(org.jacoco.core.test.validation.kotlin.KotlinInlineTest): Error while analyzing org/jacoco/core/test/validation/kotlin/targets/KotlinInlineTarget.

among other differences that I currently investigate, and this test will pass after this change.

@marchof marchof merged commit faa8b7a into master Mar 16, 2021
Filtering automation moved this from To Do to Done Mar 16, 2021
Current work items automation moved this from Review to Done Mar 16, 2021
@marchof marchof deleted the kotlin_smap branch March 16, 2021 10:43
@michaelbrewer
Copy link

@marchof @Godin when will this be added to Gradle plugin?

@marchof
Copy link
Member

marchof commented May 2, 2021

Probably after we released JaCoCo 0.8.7. Note that the Gradle plugin is not maintained by us.

@michaelbrewer
Copy link

Looks like the new version is up for gradle is you do this:

jacoco {
	toolVersion = "0.8.7"
}

@Godin
Copy link
Member Author

Godin commented May 5, 2021

Yes - JaCoCo 0.8.7 has been released

And yes - Gradle's jacoco.toolVersion can be set to non-default value to use specific version including 0.8.7,
default value will be updated - gradle/gradle#17077

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Filtering
  
Done
Development

Successfully merging this pull request may close these issues.

Support SMAP generated by Kotlin 1.5 compiler (Support JSR-45 spec)
3 participants