Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TarsGo 与TarsNode的文件RequestF.tars不统一,导致异常 #31

Closed
yanchunan opened this issue Sep 28, 2018 · 6 comments
Closed

TarsGo 与TarsNode的文件RequestF.tars不统一,导致异常 #31

yanchunan opened this issue Sep 28, 2018 · 6 comments
Assignees

Comments

@yanchunan
Copy link

yanchunan commented Sep 28, 2018

TarsGo中RequestF.tars 中struct RequestPacket的成员为:7 require vector<unsigned byte> sBuffer; 而TarsNode中RequestF.tars 中struct RequestPacket的成员为:7 require vector<byte> sBuffer; 导致互相请求时,出现“code=-1, message=type mismatch, tag:7,type:9” 的错误。

@sandyskies sandyskies self-assigned this Sep 28, 2018
@sandyskies
Copy link
Contributor

sandyskies commented Sep 28, 2018

https://github.com/TarsCloud/TarsGo/blob/master/tars/protocol/res/RequestF.tars#L11 ,tarsgo里面是 7 require vector<unsigned byte> sBuffer, 你是不是手工改成了 require vector<byte> sBuffer ??

@yanchunan
Copy link
Author

yanchunan commented Sep 29, 2018

我倒是打算改成vector<byte>。。。 我提的Issue是TarsGo中的这个值和TarsNode, TarsCpp中定义的不一样 https://github.com/tars-node/rpc/blob/e1ea70acc87d6b93238675476141b7580fc66078/core/rpc-tars/RequestF.tars#L11,
https://github.com/TarsCloud/TarsCpp/blob/717971e1cb77de16c06d01c824efd3a2d3c855db/servant/tup/RequestF.tars#L28 你们内部是不是应该保持一致啊。不然TarsGo就只能自己跟自己玩,没法和Nodejs,C++等语言写的Tars服务交互了。。。

@sandyskies
Copy link
Contributor

这个是Golang 内部实现的问题,tars协议 unsigned byte,对应的才是Golang 的byte。 另外,我们测试过和cpp等语言通信是没问题的, 你这个tarsnode指的是tars.nodejs ?

@yanchunan
Copy link
Author

是的,指的是tars nodejs版的。不好意思,我发现是我看错了。TarsGO里面vector 和vector 都是SIMPLE_LIST。我再看看TarsNode吧。先关闭问题了。谢谢你的回复!

@sandyskies
Copy link
Contributor

@yanchunan 我们也看下吧,可能是tars.nodejs 没做 simple_list 的兼容,方便的话加我微信,我们聊下,sandyksies

@sandyskies
Copy link
Contributor

0039277 @yanchunan 已解决,请测试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants