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

Revert "optimize: generate the go type for const" #187

Closed
wants to merge 1 commit into from

Conversation

HeyJavaBean
Copy link
Member

Reverts #178

@HeyJavaBean HeyJavaBean requested review from a team as code owners April 9, 2024 07:43
@luryson
Copy link
Contributor

luryson commented Apr 9, 2024

增加 raw_struct,导致无法支持了吗?

@FGYFFFF
Copy link
Contributor

FGYFFFF commented Apr 10, 2024

@luryson 不是的;只是刚刚好这个pr 同时修了几个问题。 理论上生成的 const 应该和 thrift 定义的一样; revert 掉的原因主要如下:

  • "thrift" 官方工具 const int类型 映射的都是 go 的 int,实际上并没有区分位数;如果修改,后续与其通信可能存在问题
  • 这个能力会导致现有代码大量编译报错,十分影响用户的体验

@luryson
Copy link
Contributor

luryson commented Apr 10, 2024

@luryson 不是的;只是刚刚好这个pr 同时修了几个问题。 理论上生成的 const 应该和 thrift 定义的一样; revert 掉的原因主要如下:

  • "thrift" 官方工具 const int类型 映射的都是 go 的 int,实际上并没有区分位数;如果修改,后续与其通信可能存在问题
  • 这个能力会导致现有代码大量编译报错,十分影响用户的体验

后面是不是可以通过 注解或者其他 的方式,重新支持这个 feat?

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

Successfully merging this pull request may close these issues.

3 participants