Skip to content

Commit

Permalink
Merge pull request #1715 from cloudwego/release-v0.12.3
Browse files Browse the repository at this point in the history
chore: release v0.12.3
  • Loading branch information
DMwangnima authored Feb 27, 2025
2 parents a53a472 + 5ff29fd commit 3012782
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/cloudwego/dynamicgo v0.5.2
github.com/cloudwego/fastpb v0.0.5
github.com/cloudwego/frugal v0.2.3
github.com/cloudwego/gopkg v0.1.4-0.20241217093255-8980b14172b7
github.com/cloudwego/gopkg v0.1.4
github.com/cloudwego/localsession v0.1.2
github.com/cloudwego/netpoll v0.6.5
github.com/cloudwego/runtimex v0.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ github.com/cloudwego/fastpb v0.0.5 h1:vYnBPsfbAtU5TVz5+f9UTlmSCixG9F9vRwaqE0mZPZ
github.com/cloudwego/fastpb v0.0.5/go.mod h1:Bho7aAKBUtT9RPD2cNVkTdx4yQumfSv3If7wYnm1izk=
github.com/cloudwego/frugal v0.2.3 h1:t1hhhAi8lXcx7Ncs4PR1pSZ90vlDU1cy5K2btDMFpoA=
github.com/cloudwego/frugal v0.2.3/go.mod h1:nC1U47gswLRiaxv6dybrhZvsDGCfQP9RGiiWC73CnoI=
github.com/cloudwego/gopkg v0.1.4-0.20241217093255-8980b14172b7 h1:RmKES3lXoM62rUVEEy0teTsPYNBtFpqSN1lYBw4v82g=
github.com/cloudwego/gopkg v0.1.4-0.20241217093255-8980b14172b7/go.mod h1:FQuXsRWRsSqJLsMVd5SYzp8/Z1y5gXKnVvRrWUOsCMI=
github.com/cloudwego/gopkg v0.1.4 h1:EoQiCG4sTonTPHxOGE0VlQs+sQR+Hsi2uN0qqwu8O50=
github.com/cloudwego/gopkg v0.1.4/go.mod h1:FQuXsRWRsSqJLsMVd5SYzp8/Z1y5gXKnVvRrWUOsCMI=
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
github.com/cloudwego/localsession v0.1.2 h1:RBmeLDO5sKr4ujd8iBp5LTMmuVKLdu88jjIneq/fEZ8=
Expand Down
5 changes: 4 additions & 1 deletion tool/cmd/kitex/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ func main() {
}

if args.IDLType == "thrift" && !args.LocalThriftgo {
err = sdk.InvokeThriftgoBySDK(curpath, cmd)
if err = sdk.InvokeThriftgoBySDK(curpath, cmd); err != nil {
// todo: optimize -use and remove error returned from thriftgo
out.WriteString(err.Error())
}
} else {
err = kargs.ValidateCMD(cmd.Path, args.IDLType)
if err != nil {
Expand Down
9 changes: 7 additions & 2 deletions tool/internal_pkg/tpl/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ func newServiceInfo(hasStreaming bool, keepStreamingMethods bool, keepNonStreami
return svcInfo
}
{{- $referToKitexServerInterface := and .StreamX .HasStreaming}}
{{range .AllMethods}}
{{- $isStreaming := or .ClientStreaming .ServerStreaming}}
{{- $streamingUnary := (eq .StreamingMode "unary")}}
Expand All @@ -153,6 +154,10 @@ func newServiceInfo(hasStreaming bool, keepStreamingMethods bool, keepNonStreami
{{- $bidiSide := and .ClientStreaming .ServerStreaming}}
{{- $arg := ""}}
{{- $handlerFunc := ""}}
{{- $serverInterfaceName := printf "%s.%s" .PkgRefName .ServiceName }}
{{- if $referToKitexServerInterface}}
{{- $serverInterfaceName = .ServiceName}}{{/* when streamx is enabled and there are streaming methods, refer to Server Interface defined in service/server.go */}}
{{- end}}
{{- $mode := ""}}
{{- if $streamingUnary -}} {{- $mode = "serviceinfo.StreamingUnary" }} {{- $handlerFunc = "InvokeUnaryHandler" }}
{{- else if $serverSide -}} {{- $mode = "serviceinfo.StreamingServer" }} {{- $handlerFunc = "InvokeServerStreamHandler" }}
Expand Down Expand Up @@ -228,8 +233,8 @@ func {{LowerFirst .Name}}Handler(ctx context.Context, handler interface{}, arg,
{{- end}}
{{if gt .ArgsLength 0}}realArg := {{else}}_ = {{end}}arg.(*{{if not .GenArgResultStruct}}{{.PkgRefName}}.{{end}}{{.ArgStructName}})
{{if or (not .Void) .Exceptions}}realResult := result.(*{{if not .GenArgResultStruct}}{{.PkgRefName}}.{{end}}{{.ResStructName}}){{end}}
{{if .Void}}err := handler.({{.PkgRefName}}.{{.ServiceName}}).{{.Name}}(ctx{{range .Args}}, realArg.{{.Name}}{{end}})
{{else}}success, err := handler.({{.PkgRefName}}.{{.ServiceName}}).{{.Name}}(ctx{{range .Args}}, realArg.{{.Name}}{{end}})
{{if .Void}}err := handler.({{$serverInterfaceName}}).{{.Name}}(ctx{{range .Args}}, realArg.{{.Name}}{{end}})
{{else}}success, err := handler.({{$serverInterfaceName}}).{{.Name}}(ctx{{range .Args}}, realArg.{{.Name}}{{end}})
{{end -}}
if err != nil {
{{- if $HandlerReturnKeepResp }}
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ package kitex
// Name and Version info of this framework, used for statistics and debug
const (
Name = "Kitex"
Version = "v0.12.2"
Version = "v0.12.3"
)

0 comments on commit 3012782

Please sign in to comment.