From ac858d5c597352759130d6c7766cdcef5701484b Mon Sep 17 00:00:00 2001 From: zongz Date: Tue, 30 Jan 2024 10:55:03 +0800 Subject: [PATCH] chore: make the kpm cli deprecated Signed-off-by: zongz --- README-zh.md | 31 +++++++++++++++++++++++++++++++ README.md | 31 +++++++++++++++++++++++++++++++ pkg/cmd/cmd_add.go | 2 ++ pkg/cmd/cmd_flags.go | 4 ++++ pkg/cmd/cmd_import.go | 2 ++ pkg/cmd/cmd_init.go | 2 ++ pkg/cmd/cmd_login.go | 2 ++ pkg/cmd/cmd_logout.go | 2 ++ pkg/cmd/cmd_metadata.go | 2 ++ pkg/cmd/cmd_pkg.go | 2 ++ pkg/cmd/cmd_pull.go | 2 ++ pkg/cmd/cmd_push.go | 2 ++ pkg/cmd/cmd_push_test.go | 2 ++ pkg/cmd/cmd_run.go | 2 ++ pkg/cmd/cmd_update.go | 2 ++ pkg/version/version.go | 2 ++ pkg/version/version_test.go | 3 +++ 17 files changed, 95 insertions(+) diff --git a/README-zh.md b/README-zh.md index ba2ff3a0..fe2bf073 100644 --- a/README-zh.md +++ b/README-zh.md @@ -13,6 +13,37 @@

+# 注意 ! + +KPM CLI 将在 v0.8.0 版本后被弃用,并且 KPM CLI 将被 KCL CLI 替代 - https://github.com/kcl-lang/cli. + +受到影响的部分如下所示: + +``` +kpm +├── pkg +│ ├── api +│ ├── client +│ ├── cmd # KPM CLI 将在 v0.8.0 版本后被弃用. +│ ├── constants +│ ├── env +│ ├── errors +│ ├── git +│ ├── oci +│ ├── opt +│ ├── package +│ ├── reporter +│ ├── runner +│ ├── semver +│ ├── settings +│ ├── utils +│ └── version +├── scripts +├── test +│ └── e2e # KPM CLI 的 e2e 测试将在 v0.8.0 版本后被弃用. +├── ...... +``` + ## 介绍 `kpm` 是 KCL 包管理器。`kpm` 会下载您的 KCL 包的依赖项、编译您的 KCL 包、制作可分发的包并将其上传到 KCL 包的仓库中。 diff --git a/README.md b/README.md index 6617f57b..6a3497a3 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,37 @@

+# NOTE ! + +The KPM CLI will be deprecated after v0.8.0, and the KPM CLI will be replaced by the KCL CLI - https://github.com/kcl-lang/cli. + +The affected parts are shown below: + +``` +kpm +├── pkg +│ ├── api +│ ├── client +│ ├── cmd # The KPM CLI will deprecated after v0.8.0. +│ ├── constants +│ ├── env +│ ├── errors +│ ├── git +│ ├── oci +│ ├── opt +│ ├── package +│ ├── reporter +│ ├── runner +│ ├── semver +│ ├── settings +│ ├── utils +│ └── version +├── scripts +├── test +│ └── e2e # The e2e test for KPM CLI will deprecated after v0.8.0. +├── ...... +``` + ## Introduction `kpm` is the KCL package manager. `kpm` downloads your KCL package's dependencies, compiles your KCL packages, makes packages, and uploads them to the kcl package registry. diff --git a/pkg/cmd/cmd_add.go b/pkg/cmd/cmd_add.go index 59b7fc5f..d9e2c605 100644 --- a/pkg/cmd/cmd_add.go +++ b/pkg/cmd/cmd_add.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_flags.go b/pkg/cmd/cmd_flags.go index bf91f861..616d9f0f 100644 --- a/pkg/cmd/cmd_flags.go +++ b/pkg/cmd/cmd_flags.go @@ -1,5 +1,9 @@ // Copyright 2023 The KCL Authors. All rights reserved. // This file provides all the flags in the kpm cli. +// +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. + package cmd const FLAG_INPUT = "input" diff --git a/pkg/cmd/cmd_import.go b/pkg/cmd/cmd_import.go index b359966d..d8a14393 100644 --- a/pkg/cmd/cmd_import.go +++ b/pkg/cmd/cmd_import.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_init.go b/pkg/cmd/cmd_init.go index 1d5154f3..a0f38021 100644 --- a/pkg/cmd/cmd_init.go +++ b/pkg/cmd/cmd_init.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_login.go b/pkg/cmd/cmd_login.go index 9c221db4..1d5cbe67 100644 --- a/pkg/cmd/cmd_login.go +++ b/pkg/cmd/cmd_login.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_logout.go b/pkg/cmd/cmd_logout.go index bd0d4074..faa6d5f5 100644 --- a/pkg/cmd/cmd_logout.go +++ b/pkg/cmd/cmd_logout.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_metadata.go b/pkg/cmd/cmd_metadata.go index ee0db1d1..46723f8b 100644 --- a/pkg/cmd/cmd_metadata.go +++ b/pkg/cmd/cmd_metadata.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_pkg.go b/pkg/cmd/cmd_pkg.go index ee3858a2..9d954e99 100644 --- a/pkg/cmd/cmd_pkg.go +++ b/pkg/cmd/cmd_pkg.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_pull.go b/pkg/cmd/cmd_pull.go index 0bde3219..2e7086d5 100644 --- a/pkg/cmd/cmd_pull.go +++ b/pkg/cmd/cmd_pull.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_push.go b/pkg/cmd/cmd_push.go index fb829012..28941cf9 100644 --- a/pkg/cmd/cmd_push.go +++ b/pkg/cmd/cmd_push.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_push_test.go b/pkg/cmd/cmd_push_test.go index 40e50082..11a59cfc 100644 --- a/pkg/cmd/cmd_push_test.go +++ b/pkg/cmd/cmd_push_test.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_run.go b/pkg/cmd/cmd_run.go index db3a539c..bd621030 100644 --- a/pkg/cmd/cmd_run.go +++ b/pkg/cmd/cmd_run.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/cmd/cmd_update.go b/pkg/cmd/cmd_update.go index 6f004a26..dca866db 100644 --- a/pkg/cmd/cmd_update.go +++ b/pkg/cmd/cmd_update.go @@ -1,4 +1,6 @@ // Copyright 2023 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package cmd diff --git a/pkg/version/version.go b/pkg/version/version.go index 343259eb..7668f5de 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,4 +1,6 @@ // Copyright 2022 The KCL Authors. All rights reserved. +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package version diff --git a/pkg/version/version_test.go b/pkg/version/version_test.go index d789d1d4..08e7bf02 100644 --- a/pkg/version/version_test.go +++ b/pkg/version/version_test.go @@ -1,7 +1,10 @@ +// Deprecated: The entire contents of this file will be deprecated. +// Please use the kcl cli - https://github.com/kcl-lang/cli. package version import "testing" +// Deprecated: This function will be removed in a future version. func TestGetVersionInStr(t *testing.T) { tests := []struct { name string