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

Ability to instrument only permitted classes #673

Closed
LlamaLad7 opened this issue Aug 15, 2024 · 2 comments · Fixed by #681
Closed

Ability to instrument only permitted classes #673

LlamaLad7 opened this issue Aug 15, 2024 · 2 comments · Fixed by #681
Assignees
Labels
Feature Feature request issue type S: ready for release Status: merged in the main branch

Comments

@LlamaLad7
Copy link

What is your use-case and why do you need this feature?
In the Kotlin compiler, there are a lot of tests which consider all the fields of a generated class, e.g. here, and because they use classfile version 52 (Java 8), the coverage agent adds a field to the class which breaks the test:

Fail: lambda should only capture 's': [final java.lang.String A$f$1.$s, private static transient boolean[] A$f$1.__$hits$__]

Describe the solution you'd like
Ideally I would be able to whitelist the specific compiler classes I am interested in instead of having to blacklist the offending test classes.
Something like:

kover {
    currentProject {
        instrumentation {
            includedClasses.add("org.jetbrains.kotlin.fir.*")
        }
    }
}

to match the existing excludedClasses option.

@LlamaLad7 LlamaLad7 added Feature Feature request issue type S: untriaged Status: issue reported but unprocessed labels Aug 15, 2024
@LlamaLad7
Copy link
Author

LlamaLad7 commented Aug 16, 2024

Alternative for my particular use case: JetBrains/intellij-coverage#64

@shanshin shanshin self-assigned this Aug 28, 2024
@shanshin shanshin added S: in progress Status: implementing or design in process and removed S: untriaged Status: issue reported but unprocessed labels Aug 28, 2024
@shanshin shanshin reopened this Aug 28, 2024
@shanshin shanshin added S: ready for release Status: merged in the main branch and removed S: in progress Status: implementing or design in process labels Aug 28, 2024
@shanshin
Copy link
Collaborator

shanshin commented Sep 3, 2024

Resolved in 0.9.0-RC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature request issue type S: ready for release Status: merged in the main branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants