Skip to content

Commit

Permalink
chore: bump kcl-go to latest client mode
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Sep 18, 2024
1 parent d1b9c0c commit 12d169f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.10.1
6 changes: 2 additions & 4 deletions cmd/kcl/commands/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ package cmd

import (
"github.com/spf13/cobra"
"kcl-lang.io/kcl-go/pkg/runtime"
"kcl-lang.io/kcl-go/pkg/service"
"kcl-lang.io/kcl-go/pkg/server"
)

const (
Expand Down Expand Up @@ -37,8 +36,7 @@ func NewServerCmd() *cobra.Command {
Long: serverDesc,
Example: serverExample,
RunE: func(_ *cobra.Command, args []string) error {
runtime.InitRuntime(processCount)
return service.RunRestServer(http)
return server.RunRestServer(http)
},
SilenceUsage: true,
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/kcl/commands/vet.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/spf13/cobra"
"kcl-lang.io/cli/pkg/fs"
"kcl-lang.io/kcl-go/pkg/service"
"kcl-lang.io/kcl-go/pkg/kcl"
"kcl-lang.io/kcl-go/pkg/spec/gpyrpc"
"kcl-lang.io/kcl-go/pkg/tools/validate"
)
Expand Down Expand Up @@ -95,8 +95,8 @@ func validateFile(dataFile, codeFile string, opts *validate.ValidateOptions) (ok
if opts == nil {
opts = &validate.ValidateOptions{}
}
client := service.NewKclvmServiceClient()
resp, err := client.ValidateCode(&gpyrpc.ValidateCode_Args{
svc := kcl.Service()
resp, err := svc.ValidateCode(&gpyrpc.ValidateCode_Args{
Datafile: dataFile,
File: codeFile,
Schema: opts.Schema,
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/onsi/gomega v1.34.2
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
kcl-lang.io/kcl-go v0.10.1
kcl-lang.io/kcl-go v0.10.2-0.20240918105252-6fc919ce5b6d
kcl-lang.io/kcl-openapi v0.9.0
kcl-lang.io/kcl-plugin v0.6.0
kcl-lang.io/kpm v0.10.0
Expand All @@ -34,6 +34,7 @@ require (
github.com/containers/storage v1.55.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/ebitengine/purego v0.7.1 // indirect
github.com/elliotchance/orderedmap/v2 v2.4.0 // indirect
github.com/emicklei/proto v1.13.2 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand Down Expand Up @@ -73,7 +74,7 @@ require (
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
kcl-lang.io/lib v0.10.0 // indirect
kcl-lang.io/lib v0.10.1-rc.3 // indirect
)

require (
Expand Down Expand Up @@ -158,7 +159,6 @@ require (
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1
github.com/powerman/rpc-codec v1.2.2 // indirect
github.com/prometheus/client_golang v1.20.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3
github.com/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo=
github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C6POAuiViluc=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/ebitengine/purego v0.7.1 h1:6/55d26lG3o9VCZX8lping+bZcmShseiqlh2bnUDiPA=
github.com/ebitengine/purego v0.7.1/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
Expand Down Expand Up @@ -816,8 +818,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/powerman/rpc-codec v1.2.2 h1:BK0JScZivljhwW/vLLhZLtUgqSxc/CD3sHEs8LiwwKw=
github.com/powerman/rpc-codec v1.2.2/go.mod h1:3Qr/y/+u3CwcSww9tfJMRn/95lB2qUdUeIQe7BYlLDo=
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
Expand Down Expand Up @@ -1692,16 +1692,16 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
kcl-lang.io/kcl-go v0.10.1 h1:2YXQP5QcwNGVLnxdcTNLRoJkYn357gCgqbgU+8hVHxU=
kcl-lang.io/kcl-go v0.10.1/go.mod h1:AQIQplXxCpodSw1Kt+qiFvIB7tzBQ18djT2GytS33nM=
kcl-lang.io/kcl-go v0.10.2-0.20240918105252-6fc919ce5b6d h1:U9tTTQZTma/mKU3ALhJFhhYtLJnlS4SuUWZmMR3UjAM=
kcl-lang.io/kcl-go v0.10.2-0.20240918105252-6fc919ce5b6d/go.mod h1:nrKhkCm5VyfJ97dsNoVF600uY09y0qY6i1M66KucL+8=
kcl-lang.io/kcl-openapi v0.9.0 h1:HUnc5pUGde83PI5CAe1ZvZhdbcxD9X2ABUp1tV+oYqw=
kcl-lang.io/kcl-openapi v0.9.0/go.mod h1:kGCf0AZygrZyB+xpmMtiC3FYoiV/1rCLXuAq2QtuLf8=
kcl-lang.io/kcl-plugin v0.6.0 h1:rBdoqKDPdOtojeOHCFnXoB/I7ltFjV61r0KkfOcL5sE=
kcl-lang.io/kcl-plugin v0.6.0/go.mod h1:LoIouleHYRKAvFcdW30yUlhsMYH2W9zD5Ji1XHfbht4=
kcl-lang.io/kpm v0.10.0 h1:VnsJ5IS8YSvgXYnItLdaJp/1tTrSSmThzmNCWmhm5Bg=
kcl-lang.io/kpm v0.10.0/go.mod h1:MhQh9kewILcUlhuhVBksxWVZfgdwkpkX6xFj1pxF0QM=
kcl-lang.io/lib v0.10.0 h1:VLwZTMfRZyaGfIJc8qxLn7bKr24PSgZLc3SxMRxUaN4=
kcl-lang.io/lib v0.10.0/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs=
kcl-lang.io/lib v0.10.1-rc.3 h1:+3sCOLV3ay9JHwvaZKOJgX9hwb2MO5OiGbAtsNLH5E4=
kcl-lang.io/lib v0.10.1-rc.3/go.mod h1:MfVEiCo3Yr6jZqwSo84WmjFZdqNRtXMbGtDwUM27kTY=
oras.land/oras-go v1.2.6 h1:z8cmxQXBU8yZ4mkytWqXfo6tZcamPwjsuxYU81xJ8Lk=
oras.land/oras-go v1.2.6/go.mod h1:OVPc1PegSEe/K8YiLfosrlqlqTN9PUyFvOw5Y9gwrT8=
oras.land/oras-go/v2 v2.5.0 h1:o8Me9kLY74Vp5uw07QXPiitjsw7qNXi8Twd+19Zf02c=
Expand Down
3 changes: 2 additions & 1 deletion pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func getVersion(version string) string {
}

const (
VersionTypeLatest = Version_0_10_0
VersionTypeLatest = Version_0_10_1

Version_0_10_1 VersionType = "0.10.1"
Version_0_10_0 VersionType = "0.10.0"

Version_0_9_8 VersionType = "0.9.8"
Expand Down

0 comments on commit 12d169f

Please sign in to comment.