-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: prevent panic on depinject when input or output struct has an un… #12786
fix: prevent panic on depinject when input or output struct has an un… #12786
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would also be good to have errors for unexported fields in Out
structs
Co-authored-by: Aaron Craelius <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #12786 +/- ##
==========================================
+ Coverage 56.28% 56.98% +0.70%
==========================================
Files 649 661 +12
Lines 54955 56088 +1133
==========================================
+ Hits 30929 31963 +1034
- Misses 21540 21606 +66
- Partials 2486 2519 +33
|
Hey, @aaronc, @kocubinski, I added the logic for the out struct. However, there is a case where I can't replicate it in testing. Maybe you can guide me. The Out error correction has to happen in two places: cosmos-sdk/depinject/container.go Lines 447 to 457 in 0881d29
However, I have to check here as well because whenever I tested with any module existing keeper, it panics there. I don't know how to manually replicate it in the test, though(for coverage purposes) cosmos-sdk/depinject/struct_args.go Lines 177 to 180 in 0881d29
|
this has been resolved |
…exported fild
Description
Closes: #1943
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change