apple / apple/pkl

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

Open
#1,117 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
11.5k
Forks
402
Avg merge
1d 15h
Merged PRs (30d)
20

Description

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

Contributor guide

Open the contributing guide

Research direction

Start with CliJavaCodeGeneratorOptions.kt, CliBaseOptions.kt, and CliTestOptions.kt at the linked locations, then inspect nearby Kotlin data classes for default parameters. Add @JvmOverloads where appropriate so other JVM languages can use overloads, and verify that the affected public option constructors expose the expected overloads.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.