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

fix(pilota-build): keep the leading underscore in idl method name #282

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

Ggiggle
Copy link
Contributor

@Ggiggle Ggiggle commented Nov 5, 2024

Motivation

Referred to codegen issue, the method name starting with '_' would be removed when using the ToUpperCamelCase trait in heck 0.5, which is the first step for the function name. This process is because that in order to generate a struct name that conforms to the rust specification, this step will be performed on the function name to obtain the prefix of the function parameter variable name.

Solution

We will keep the beginning underscore of function name string using the IdentName trait defined in our own crate, which to_upper_ident method would preserve the beginning _.

@Ggiggle Ggiggle requested review from a team as code owners November 5, 2024 05:10
@Ggiggle Ggiggle merged commit 765a699 into main Nov 5, 2024
11 checks passed
@Ggiggle Ggiggle deleted the fix/method_name_start_with_underscore branch November 5, 2024 06:36
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.

2 participants