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

WIP:optimize(hz): generate enum marshal and unmarshal separately #980

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

FGYFFFF
Copy link
Contributor

@FGYFFFF FGYFFFF commented Oct 24, 2023

What type of PR is this?

optimize

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

修改 thrift 生成 enum marshal/unmarshal 的行为

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: generate enum marshal and unmarshal separately
zh(optional):
之前的 thriftgo 提供了"json_enum_as_text" 选项,该选项的描述是只生成 enum 的 marshalText 能力;但是实际使用后会将 "marshalText"&"unmarshalText"都生成出来,因此做了一次更细粒度的生成。
行为不一致:

  • 之前默认不生成 unmarshal,修改后默认都生成 unmarshal()。这个才是合理的默认行为

(Optional) Which issue(s) this PR fixes:

(Optional) The PR that updates user documentation:

@FGYFFFF FGYFFFF requested review from a team as code owners October 24, 2023 09:16
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e02c162) 81.86% compared to head (522a73e) 81.86%.

❗ Current head 522a73e differs from pull request most recent head 0e0addb. Consider uploading reports for the commit 0e0addb to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #980   +/-   ##
========================================
  Coverage    81.86%   81.86%           
========================================
  Files           98       98           
  Lines         9932     9932           
========================================
  Hits          8131     8131           
  Misses        1311     1311           
  Partials       490      490           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

None yet

1 participant