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

Start removing HybridCodec (init + auth, bank, distribution) #6838

Merged
merged 6 commits into from
Jul 24, 2020

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Jul 24, 2020

ref: #6837


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #6838 into master will increase coverage by 5.46%.
The diff coverage is 82.71%.

@@            Coverage Diff             @@
##           master    #6838      +/-   ##
==========================================
+ Coverage   55.96%   61.42%   +5.46%     
==========================================
  Files         224      508     +284     
  Lines       14203    31467   +17264     
==========================================
+ Hits         7948    19329   +11381     
- Misses       5674    10637    +4963     
- Partials      581     1501     +920     

@aaronc aaronc changed the title Remove HybridCodec Start removing HybridCodec (init + auth, bank, distribution) Jul 24, 2020
@aaronc aaronc added A:automerge Automatically merge PR once all prerequisites pass. C:Encoding C:x/auth C:x/bank C:x/distribution distribution module related labels Jul 24, 2020
@aaronc aaronc mentioned this pull request Jul 24, 2020
16 tasks
@aaronc aaronc marked this pull request as ready for review July 24, 2020 18:29
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Although for me it seems that it would be much easier if we deleted the Queriers completely

ret0, _ := ret[0].(types0.Querier)
return ret0
}

// NewQuerierHandler indicates an expected call of NewQuerierHandler
// LegacyQuerierHandler indicates an expected call of LegacyQuerierHandler
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc is not consistent with the function name

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just added a few comments on parameter naming consistency. I didn't feel like commenting on all the modules, but keeping consistency by using legacyQuerierCdc makes sense to me.

@@ -10,24 +10,24 @@ import (
)

// NewQuerier creates a querier for auth REST endpoints
func NewQuerier(k AccountKeeper) sdk.Querier {
func NewQuerier(k AccountKeeper, cdc codec.JSONMarshaler) sdk.Querier {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be consistent with the parameter naming?

Suggested change
func NewQuerier(k AccountKeeper, cdc codec.JSONMarshaler) sdk.Querier {
func NewQuerier(k AccountKeeper, legacyQuerierCdc codec.JSONMarshaler) sdk.Querier {

func (am AppModule) NewQuerierHandler() sdk.Querier {
return keeper.NewQuerier(am.accountKeeper)
// LegacyQuerierHandler returns the auth module sdk.Querier.
func (am AppModule) LegacyQuerierHandler(jsonCdc codec.JSONMarshaler) sdk.Querier {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (am AppModule) LegacyQuerierHandler(jsonCdc codec.JSONMarshaler) sdk.Querier {
func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc codec.JSONMarshaler) sdk.Querier {

@mergify mergify bot merged commit 80f7ff6 into master Jul 24, 2020
@mergify mergify bot deleted the aaronc/6837-remove-hybrid-codec branch July 24, 2020 19:04
@alexanderbez
Copy link
Contributor

Ohhh well automerged...would be nice to address these in a followup PR then @aaronc

@alexanderbez
Copy link
Contributor

LGTM. Although for me it seems that it would be much easier if we deleted the Queriers completely

We cannot @fedekunze -- we've already proposed and agreed that we're keeping the legacy API around for 1 release to allow clients enough time to migrate to the new gRPC and/or gRPC HTTP gateway.

larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
…6838)

* Start to remove HybridCodec

* Rename

* Fixes

* Test fixes

* Cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:Encoding C:x/auth C:x/bank C:x/distribution distribution module related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants