From 70e7670146fcf87fddb7101c751a7cd1296795e8 Mon Sep 17 00:00:00 2001 From: Bhanu Reddy Date: Thu, 10 Sep 2026 08:17:42 +0530 Subject: [PATCH] RTECO-2003: add the Choco project type `jf setup choco` needs this: the whole setup family is keyed by project.ProjectType, so packageManagerToRepositoryPackageType, packageManagerConfigs and IsSupportedPackageManager all look choco up by enum value, and setupCmd resolves the CLI argument through project.FromString. Appended at the end of both the const block and ProjectTypes. The enum is index-based (ProjectTypes[projectType]), so inserting mid-list would silently renumber every later type. `jf choco` itself does not need this; it reports telemetry through ExecWithPackageManager, which takes a plain string, as nix, apt and huggingface already do. Co-Authored-By: Claude Opus 5 --- common/project/projectconfig.go | 2 ++ common/project/projectconfig_test.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/common/project/projectconfig.go b/common/project/projectconfig.go index 51eebe088..410e0b5bd 100644 --- a/common/project/projectconfig.go +++ b/common/project/projectconfig.go @@ -53,6 +53,7 @@ const ( Cargo Apt Apk + Choco ) type ConfigType string @@ -89,6 +90,7 @@ var ProjectTypes = []string{ "cargo", "apt", "apk", + "choco", } func (projectType ProjectType) String() string { diff --git a/common/project/projectconfig_test.go b/common/project/projectconfig_test.go index cbee12c41..f0b45d982 100644 --- a/common/project/projectconfig_test.go +++ b/common/project/projectconfig_test.go @@ -40,3 +40,8 @@ func TestCargoStringRoundTrip(t *testing.T) { assert.Equal(t, "cargo", Cargo.String()) assert.Equal(t, Cargo, FromString(Cargo.String())) } + +func TestChocoStringRoundTrip(t *testing.T) { + assert.Equal(t, "choco", Choco.String()) + assert.Equal(t, Choco, FromString(Choco.String())) +}