incubator-pegasus icon indicating copy to clipboard operation
incubator-pegasus copied to clipboard

avoid to modify idl generate code in client

Open shalk opened this issue 1 year ago • 2 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

I found java client use 10 idl files, c++ use 12 idl files, go use 11 idl files.

➜  grep 'namespace java' idl/* | wc -l 
      10
➜  grep 'namespace go' idl/* | wc -l
      11
➜  grep 'namespace cpp' idl/* | wc -l
      12

Though java use 10 idl files, but java client only generate 9 idl files code. This is strange, and hard to maintain.

For java client, I think either just remove namespace java from dns.thrift , not use the dns.thrift to generate java code. or use the generate code of dns.thrift, modify the java-thrift lib.

  1. What did you do? If possible, provide a recipe for reproducing the error.

  2. What did you expect to see?

  3. What did you see instead?

  4. What version of Pegasus are you using?

shalk avatar Apr 30 '24 06:04 shalk

Maybe it's a mistake, I'll check it later!

acelyc111 avatar May 22 '24 16:05 acelyc111

@shalk

  1. java client use 10 idl files, c++ use 12 idl files, go use 11 idl files

It's because each language client has different function set. For example, the admin-cli is using go-client to support some CLI commands, but the Java client doesn't have such function. So you can see the go-client use an extra idl/replica_admin.thrift.

  1. Though java use 10 idl files, but java client only generate 9 idl files code

Yes, the dsn.thrift is used for place holder, I'll try to clarify it.

acelyc111 avatar May 23 '24 02:05 acelyc111