mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 14:20:35 +01:00
[PR #935] [MERGED] Turn CLI commands into objects, statically register subcommands #813
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/935
Author: @bioball
Created: 2/5/2025
Status: ✅ Merged
Merged: 2/5/2025
Merged by: @bioball
Base:
main← Head:polish-subcommands📝 Commits (1)
7f9e125Turn CLI commands into objects, statically register subcommands📊 Changes
15 files changed (+223 additions, -247 deletions)
View changed files
📝
pkl-cli/src/main/kotlin/org/pkl/cli/Main.kt(+2 -18)📝
pkl-cli/src/main/kotlin/org/pkl/cli/commands/AnalyzeCommand.kt(+27 -29)📝
pkl-cli/src/main/kotlin/org/pkl/cli/commands/DownloadPackageCommand.kt(+5 -5)📝
pkl-cli/src/main/kotlin/org/pkl/cli/commands/EvalCommand.kt(+8 -12)📝
pkl-cli/src/main/kotlin/org/pkl/cli/commands/ProjectCommand.kt(+106 -108)📝
pkl-cli/src/main/kotlin/org/pkl/cli/commands/ReplCommand.kt(+3 -7)📝
pkl-cli/src/main/kotlin/org/pkl/cli/commands/RootCommand.kt(+18 -4)📝
pkl-cli/src/main/kotlin/org/pkl/cli/commands/ServerCommand.kt(+3 -3)📝
pkl-cli/src/main/kotlin/org/pkl/cli/commands/TestCommand.kt(+3 -3)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliMainTest.kt(+17 -16)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliTestRunnerTest.kt(+4 -12)📝
pkl-codegen-java/src/main/kotlin/org/pkl/codegen/java/Main.kt(+13 -13)📝
pkl-codegen-kotlin/src/main/kotlin/org/pkl/codegen/kotlin/Main.kt(+10 -10)📝
pkl-doc/src/main/kotlin/org/pkl/doc/Main.kt(+2 -2)📝
pkl-doc/src/test/kotlin/org/pkl/doc/CliMainTest.kt(+2 -5)📄 Description
This is a minor improvement: all
Commandare now objects, and they register their own subcommands.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.