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 for when runtime API field name is _ #1191

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

jsdw
Copy link
Collaborator

@jsdw jsdw commented Oct 5, 2023

Runtime APIs are methods which take arguments, but Subxt converts these argument names into struct field names. Mostly this is ok, but "_" is a valid argument name and not a valid struct name (I can't think of any other cases of valid argument names that arent valid struct names offhand; can you?).

Anyway, we fix this specific case in the runtime API codegen

@jsdw jsdw requested a review from a team as a code owner October 5, 2023 10:57
Copy link
Collaborator

@lexnv lexnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Lovely test!

Copy link
Contributor

@tadeohepperle tadeohepperle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@niklasad1 niklasad1 merged commit 919b866 into master Oct 5, 2023
10 checks passed
@niklasad1 niklasad1 deleted the jsdw-fix-runtime-api-underscore-name branch October 5, 2023 13:16
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

Successfully merging this pull request may close these issues.

4 participants