Make CliktCommands classes (#963)

Missed these three classes.

This prevents the AOT compiler from statically initializing CLI argument
default values (like working dir).
This commit is contained in:
Daniel Chao
2025-02-18 08:29:59 -08:00
committed by GitHub
parent 28b128f86f
commit ee23a8c3f4
3 changed files with 6 additions and 6 deletions

View File

@@ -32,11 +32,11 @@ class AnalyzeCommand :
epilog = "For more information, visit $helpLink", epilog = "For more information, visit $helpLink",
) { ) {
init { init {
subcommands(AnalyzeImportsCommand) subcommands(AnalyzeImportsCommand())
} }
} }
object AnalyzeImportsCommand : class AnalyzeImportsCommand :
ModulesCommand( ModulesCommand(
name = "imports", name = "imports",
helpLink = helpLink, helpLink = helpLink,

View File

@@ -28,10 +28,10 @@ import org.pkl.core.Release
/** Main method for the Java code generator CLI. */ /** Main method for the Java code generator CLI. */
internal fun main(args: Array<String>) { internal fun main(args: Array<String>) {
cliMain { PklJavaCodegenCommand.main(args) } cliMain { PklJavaCodegenCommand().main(args) }
} }
object PklJavaCodegenCommand : class PklJavaCodegenCommand :
ModulesCommand( ModulesCommand(
name = "pkl-codegen-java", name = "pkl-codegen-java",
helpLink = Release.current().documentation().homepage(), helpLink = Release.current().documentation().homepage(),

View File

@@ -31,10 +31,10 @@ import org.pkl.core.Release
/** Main method for the Kotlin code generator CLI. */ /** Main method for the Kotlin code generator CLI. */
internal fun main(args: Array<String>) { internal fun main(args: Array<String>) {
cliMain { PklKotlinCodegenCommand.main(args) } cliMain { PklKotlinCodegenCommand().main(args) }
} }
object PklKotlinCodegenCommand : class PklKotlinCodegenCommand :
ModulesCommand( ModulesCommand(
name = "pkl-codegen-kotlin", name = "pkl-codegen-kotlin",
helpLink = Release.current().documentation().homepage(), helpLink = Release.current().documentation().homepage(),