-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: Move context types to new ctx module (#450) #451
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/replies #451 +/- ##
================================================
- Coverage 72.49% 72.19% -0.30%
================================================
Files 62 63 +1
Lines 3795 3812 +17
================================================
+ Hits 2751 2752 +1
- Misses 1044 1060 +16 ☔ View full report in Codecov by Sentry. |
13aa5de
to
b3ff3de
Compare
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.
Mostly ok, but I'd like to quickly talk about deprecation order (it's prob right, but I want to double check)
sylvia/src/types.rs
Outdated
@@ -462,12 +460,13 @@ impl<'a, Contract: ?Sized> AsRef<cosmwasm_std::Addr> for Remote<'a, Contract> { | |||
|
|||
/// Represantation of `reply` context received in entry point. | |||
#[non_exhaustive] | |||
#[deprecated( | |||
since = "1.3.0", | |||
note = "This type will be replaced with `sylvia::replies::ReplyCtx` in 2.0.0." |
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.
👍
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.
Only thing I am wondering right now - do we want to deprecate this struct or do we want to throw a deprecation warning using #[sv::msg(reply)]
without #[sv::features(replies)]
? I'm not debating on if this is ok to deprecate this, but which one gives back a better warning message (or even error using the wrong context - however I think that the old context could be in fact used with new messages if the proper From
is implemented? Or not? Or maybe both could be? Let's chat about it).
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.
It might be used if we initialize the context with empty vectors and set the gas to 0. I'm not sure if the detection which ReplyCtx
is used would be possible though.
I went with different approach and moved all the context types to new ctx module.
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.
The only comment from me is the one we discussed before - there should be exactly one ReplyCtx
that is not deprecated
b6cb2ca
to
d57d49f
Compare
b3ff3de
to
0a3cc71
Compare
sylvia::replies::ReplyCtx
with additional fields (#450)Remove unnecessary `#[allow(deprecated)]` statements.
3eb1ebf
to
403bf47
Compare
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.
LGTM!
No description provided.