GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — KotlinSerializableFilter should filter more methods by Godin · Pull Request #1971 · jacoco/jacoco

Conversation

@Godin

@Godin Godin commented Oct 10, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This was overlooked in #1885

See #1969 (comment)


For example in case of

@kotlinx.serialization.Serializable
enum class Example {
    V
}

or

@kotlinx.serialization.Serializable
sealed class Example {
        @kotlinx.serialization.Serializable
        data class A(val data: String): Example()
}
  • Example$Companion.get$cachedSerializer()
  • Example$Companion.serializer()
  • Example._init_$_anonymous_() - see JetBrains/kotlin@3f034e8

In case of

@kotlinx.serialization.Serializable
object Example
  • Example.get$cachedSerializer()
  • Example.serializer()

And in case of

@kotlinx.serialization.Serializable
data class Example(
    val data1: List<String>,
    val data2: List<String>,
)
  • Example._childSerializers$_anonymous_() - see JetBrains/kotlin@3f034e8 and JetBrains/kotlin@b35161e
  • Example._childSerializers$_anonymous_$0()

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Godin Godin added this to the 0.8.14 milestone Oct 9, 2025
@Godin Godin self-assigned this Oct 9, 2025
@Godin Godin added this to Filtering Oct 9, 2025
@Godin Godin added component: core.filters language: Kotlin Tickets about Kotlin language support labels Oct 9, 2025
@github-project-automation github-project-automation Bot moved this to Awaiting triage in Filtering Oct 9, 2025
@Godin Godin moved this from Awaiting triage to To Do in Filtering Oct 9, 2025
@Godin Godin mentioned this pull request Oct 9, 2025
KotlinSerializationFilter does not work with sealed classes annotated with @Serializable and crashes JaCoCo report generation #1969
Closed
Godin added 2 commits October 10, 2025 22:29
@Godin
(WIP) update validation tests
fd69632
@Godin
(WIP) update unit tests
4b66c3c
@Godin Godin moved this from To Do to In Progress in Filtering Oct 10, 2025
Godin added 2 commits October 11, 2025 00:37
@Godin
(WIP) fix
4d53c04
@Godin
(WIP) update changelog
563e358
@Godin Godin mentioned this pull request Oct 10, 2025
KotlinSerializableFilter should filter out serializer method in parameterized types #1972
Open
@Godin
Godin requested a review from leveretka October 10, 2025 23:00
leveretka
leveretka approved these changes Oct 10, 2025
View reviewed changes

@leveretka leveretka left a comment •
edited by Godin
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed this change offline.

The case with generic types can be handled later - #1972, other 3 cases needs to be covered to improve the behavior in case of serialization plugin.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Godin
Godin merged commit de76181 into jacoco:master Oct 10, 2025
@Godin
Godin deleted the KotlinSerializableFilter branch October 10, 2025 23:32
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Filtering Oct 10, 2025
@Godin

Godin commented Oct 11, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Since there are many other projects waiting JaCoCo release with upgraded ASM (#1965), we are postponing the only so far found unhandled remaining and not so easy to handle case of @kotlinx.serialization.Serializable #1971, and staged 0.8.14 to be released with this change as latest. CC @merks @iloveeclipse

@Dukoff92 @ajeihala Even if we are very confident in absence of NPEs and in this change in general, would it be possible to test latest snapshot to check our theory that with this change even without #1971 situation is already much better than before, and there are no other remaining cases than #1971 ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Dukoff92

Dukoff92 commented Oct 11, 2025

Copy link
Copy Markdown

@Godin

Thanks again for looking into the issue and providing a fix. I can confirm that everything looks good with the latest snapshot version. I’ve checked all sealed classes with the @Serializable annotation in our codebase, and I don’t see any generated methods in the report.

I also looked at the generated methods when data class parameters are of type List, and didn’t find any generated ones for those either.

We don’t have any enum classes using serialization, so I can’t speak to that, but I see that it’s been addressed in the PR above. Maybe @ajeihala can test it out and provide more clarity.

Godin reacted with thumbs up emoji Godin reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Godin

Godin commented Oct 11, 2025

Copy link
Copy Markdown
Member Author

@Dukoff92 Thank you very much for your fast tests! ❤️

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@marcin-arciszewski-gds marcin-arciszewski-gds mentioned this pull request Oct 17, 2025
feat: upgrade jacoco to 0.8.14 govuk-one-login/mobile-android-pipelines#191
Merged
@Godin Godin mentioned this pull request Jan 30, 2026
Kotlinx serialization generated functions are not excluded from coverage #2046
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@leveretka leveretka leveretka approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@Godin Godin

Labels

component: core.filters language: Kotlin Tickets about Kotlin language support

Projects

Filtering
Status: Done

Milestone

0.8.14

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Godin @Dukoff92 @leveretka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.