-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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!: remove legacy handler #9650
Conversation
@AmauryM I think we can also get rid of LegacyQuerier? |
I would like to, but I'm not 100% sure. Maybe let's do this in another PR, because removing LegacyQuerier is a client-breaking change. |
Codecov Report
@@ Coverage Diff @@
## master #9650 +/- ##
===========================================
+ Coverage 35.48% 63.41% +27.93%
===========================================
Files 332 562 +230
Lines 32620 37382 +4762
===========================================
+ Hits 11575 23706 +12131
+ Misses 19819 11823 -7996
- Partials 1226 1853 +627
|
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.
Why do we still need the Route()
method on the AppModule
interface?
As with #9594 (comment), we have 2 choices here:
I'm advocating for 2 here. |
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 at first glance, didn't review carefully yet
@@ -94,7 +94,7 @@ func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} | |||
|
|||
// Route returns the module's message router and handler. | |||
func (am AppModule) Route() sdk.Route { | |||
return sdk.NewRoute(types.RouterKey, NewHandler(am.accountKeeper, am.bankKeeper)) | |||
return sdk.Route{} |
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.
Should we panic instead with a clear message "this method is deprecated and not implemented by the SDK anymore" ?
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.
Yeah returning just sdk.Route{}
seems like it could lead to errors possibly? I'd recommend doing anything we can to encourage developers to not use deprecated functionality and panicing seems OK to me.
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.
Adding panic is breaking RegisterRoutes. We are not registering empty router, I think returning sdk.Route{}
is fine.
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.
utACK
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
Description
Closes: #7517
ref: comment
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