File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
2323 "strings"
2424
2525 "github.com/cloudwego/kitex/tool/cmd/kitex/utils"
26+ "github.com/cloudwego/kitex/tool/internal_pkg/util/env"
2627
2728 "github.com/cloudwego/kitex/tool/cmd/kitex/sdk"
2829
@@ -33,7 +34,6 @@ import (
3334 "github.com/cloudwego/kitex/tool/internal_pkg/pluginmode/protoc"
3435 "github.com/cloudwego/kitex/tool/internal_pkg/pluginmode/thriftgo"
3536 "github.com/cloudwego/kitex/tool/internal_pkg/prutal"
36- "github.com/cloudwego/kitex/tool/internal_pkg/util/env"
3737)
3838
3939var args kargs.Arguments
@@ -97,13 +97,17 @@ func main() {
9797 os .Exit (versions .CompatibilityCheckExitCode )
9898 }
9999 }
100- if args .IsProtobuf () && ! env .UseProtoc () {
101- g := prutal .NewPrutalGen (args .Config )
102- if err := g .Process (); err != nil {
103- log .Errorf ("%s" , err )
104- os .Exit (1 )
100+ if args .IsProtobuf () {
101+ // Whether using protoc or prutal, no longer generate the fast api for protobuf
102+ args .Config .NoFastAPI = true
103+ if ! env .UseProtoc () {
104+ g := prutal .NewPrutalGen (args .Config )
105+ if err := g .Process (); err != nil {
106+ log .Errorf ("%s" , err )
107+ os .Exit (1 )
108+ }
109+ return
105110 }
106- return
107111 }
108112
109113 out := new (bytes.Buffer )
You can’t perform that action at this time.
0 commit comments