Closed
Conversation
Collaborator
|
There's in fact a single explicit usage of the reflect library in the plugin. :) In general, it seems like the proper should be similar to what was done in #235 for compiler-embeddable, and dependencies like kotlinpoet, reflect, and klib-related stuff should all be moved into a separate configuration. |
Member
Author
Please could you share it here? |
Collaborator
Member
Author
|
Thanks! This code is inside a Worker, so the classpath should be isolated. This means the dependency can be changed from kotlinx-benchmark/plugin/build.gradle.kts Line 108 in e9becb5 |
adam-enko
added a commit
that referenced
this pull request
Nov 24, 2025
The only usage of Kotlin Reflect is inside a Worker[1], so the classpath is isolated. This means the Kotlin Reflect dependency can be changed from `implementation` to `compileOnly`. To avoid clashes with Gradle's embedded Kotlin, and with other plugins, Gradle plugins should avoid using unnecessary dependencies. Continuation of #229 [1] https://github.com/Kotlin/kotlinx-benchmark/blob/e9becb5101be4e458e1cfcd07936571f85bcb569/plugin/main/src/kotlinx/benchmark/gradle/JmhBytecodeGeneratorWorker.kt#L187
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
From what I can tell, the Kotlin Reflect dependency is unnecessary.
To avoid clashes with Gradle's embedded Kotlin, and with other plugins, Gradle plugins should avoid using unnecessary dependencies.