Improve interop with other JVM languages by annotating data classes with @JvmOverloads #316

Open
opened 2025-12-30 01:23:30 +01:00 by adam · 0 comments
Owner

Originally created by @DamianReeves on GitHub (Jul 9, 2025).

Interop with other JVM languages would be improved if the @JvmOverloads annotation was added to the library in places where default parameters are used, such as the following:

48ad4386c8/pkl-codegen-java/src/main/kotlin/org/pkl/codegen/java/CliJavaCodeGeneratorOptions.kt (L22)

48ad4386c8/pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliBaseOptions.kt (L29)

48ad4386c8/pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliTestOptions.kt (L20)

Originally created by @DamianReeves on GitHub (Jul 9, 2025). Interop with other JVM languages would be improved if the [`@JvmOverloads`](https://kotlinlang.org/docs/java-to-kotlin-interop.html#overloads-generation) annotation was added to the library in places where default parameters are used, such as the following: https://github.com/apple/pkl/blob/48ad4386c878b89dfaeef293490dd3398bbc4afc/pkl-codegen-java/src/main/kotlin/org/pkl/codegen/java/CliJavaCodeGeneratorOptions.kt#L22 https://github.com/apple/pkl/blob/48ad4386c878b89dfaeef293490dd3398bbc4afc/pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliBaseOptions.kt#L29 https://github.com/apple/pkl/blob/48ad4386c878b89dfaeef293490dd3398bbc4afc/pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliTestOptions.kt#L20
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#316