Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

byte处理问题,include文件路径问题 #214

Closed
wants to merge 2 commits into from

Conversation

listen-jin
Copy link

1、byte处理问题
thrift官网中说明,byte: An 8-bit signed integer。但是在parser.py文件的_cast_byte方法中却assert接收到的v为str类型。
2、include文件路径问题
这应该是一个建议,或者说值得改进的地方。
发现场景:thrift文件A中include了B文件,同时在B文件中include了C文件,B和C在同一个目录下,但同时和A不在同一目录下,这时如果只给了A的路径,则在解析B文件时对于include的C文件,就会报错,找不到C文件。
建议:parser.py文件中p_include方法,应该把当前解析的thrift文件所在路径加到include_dirs_中,而不是所有的thrift路径都需要调用parse方法时把所有thrift文件所在路径都添加进去,因为调用时用户并不一定知道其他文件include的文件都在哪些目录下。

@hit9 hit9 self-assigned this Jul 21, 2016
@hit9
Copy link
Contributor

hit9 commented Jul 21, 2016

Confirmed. LGTM @lxyu

@lxyu lxyu closed this in 48a2d1d Aug 26, 2016
@lxyu
Copy link
Contributor

lxyu commented Aug 26, 2016

Merged in 48a2d1d, thanks!

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants