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(bindnode): more helpful error message for enum value footgun #430

Merged
merged 1 commit into from
May 25, 2022

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented May 24, 2022

Fixes: #348

@rvagg rvagg self-assigned this May 24, 2022
@rvagg rvagg requested a review from willscott May 24, 2022 04:05
@rvagg
Copy link
Member Author

rvagg commented May 24, 2022

Note that this doesn't actually fix the other way around - if you decode "Present" you'll get Action("Present") which isn't part of the enum, it's a new typed string. So it won't actually solve a problem like #350 (comment), there's not much we can do about that I think though.

@rvagg rvagg merged commit ac672fa into master May 25, 2022
@rvagg rvagg deleted the rvagg/bindnode-enum-err branch May 25, 2022 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

node/bindnode: plug the footgun that is using the repr-level enum strings in Go
2 participants