ktr0731 / evans

Evans: more expressive universal gRPC client
MIT License
4.27k stars 188 forks source link

refactor: delete idl dependency and delete unused errors #685

Open stdll00 opened 11 months ago

stdll00 commented 11 months ago

Fix these issues:

Behavior changes

Error message changed when specify service without selecting package or speficy invalid service name.

Prepare

cp repl/testdata/test.proto repl/testdata/test2.proto
sed -i -e 's/package api;/package api2;/g'  repl/testdata/test2.proto # set different package name

On master branch

$ go run main.go --proto repl/testdata/test.proto
...
127.0.0.1:50051> service hoge
command service: unknown service name

$ go run main.go --proto repl/testdata/test.proto --proto repl/testdata/test2.proto
...
127.0.0.1:50051> service api.Example
command service: package unselected

On this branch,

$ go run main.go --proto repl/testdata/test.proto
...
api.Example@127.0.0.1:50051> service hoge
command service: unknown service name 'hoge'

$ go run main.go --proto repl/testdata/test.proto --proto repl/testdata/test2.proto
...
127.0.0.1:50051> service api.Example
command service: package unselected. please execute 'package' command at the first