-
Notifications
You must be signed in to change notification settings - Fork 80
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: refactor ibc-derive
to handle context with generic types and projects dependent on ibc-core
#1037
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1037 +/- ##
==========================================
+ Coverage 71.21% 71.36% +0.14%
==========================================
Files 178 178
Lines 18198 18352 +154
==========================================
+ Hits 12959 13096 +137
- Misses 5239 5256 +17 ☔ View full report in Codecov by Sentry. |
ibc-derive
to handle context with generic types and project dependent on ibc-core
ibc-derive
to handle context with generic types and projects dependent on ibc-core
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.
really awesome PR @Farhad-Shabani ! Really like the solution. 👍
I asked for some clarifications in the comments.
If I have a context with trait-bounded generics as following: struct MyIbcContext<T: MyTrait> { ... } How do I the trait-bound its generics while deriving #[derive(IbcClientState)]
#[validation(MyIbcContext<T: MyTrait>)]
#[execution(MyIbcContext<T: MyTrait>)]
enum AnyClientState { ... } |
What about this? #[derive(IbcClientState)]
#[validation(MyIbcContext<T>)]
#[execution(MyIbcContext<T>)]
enum AnyClientState { ... } |
The trait bounds are needed when we are deriving the |
Ahh, that's right. That's a new case! |
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.
Thanks @Farhad-Shabani ! Looks awesome. Great work 🎉
…rojects dependent on `ibc-core` (#1037) * fix: refactor ibc-derive to support broader cases * fix: cargo doc * imp: define get_impl_quote * imp: move each set of derives to the related meta-crate * imp: refactor ClientState drive to work with generics with trait-bounds * fix: remove redundant derive feature * docs: improve derive docstrings * imp: define SupportedCrate enum
Closes: #910
Closes: #999
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.