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

refactor!: Remove clientCtx.JSONCodec and rename EncodingConfig.Marshaler to Codec #9521

Merged
merged 8 commits into from Jul 1, 2021

Conversation

aleem1314
Copy link
Contributor

@aleem1314 aleem1314 commented Jun 15, 2021

Description

Closes: #9499


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...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

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...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@codecov
Copy link

codecov bot commented Jun 15, 2021

Codecov Report

Merging #9521 (668f6cb) into master (0027111) will increase coverage by 25.06%.
The diff coverage is 63.05%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #9521       +/-   ##
===========================================
+ Coverage   35.48%   60.54%   +25.06%     
===========================================
  Files         332      588      +256     
  Lines       32620    37447     +4827     
===========================================
+ Hits        11575    22674    +11099     
+ Misses      19819    12781     -7038     
- Partials     1226     1992      +766     
Impacted Files Coverage Δ
client/keys/show.go 83.67% <ø> (-0.24%) ⬇️
client/keys/types.go 100.00% <ø> (+100.00%) ⬆️
client/keys/utils.go 42.85% <ø> (+2.50%) ⬆️
client/query.go 16.98% <ø> (ø)
client/rpc/block.go 10.00% <ø> (ø)
client/rpc/routes.go 100.00% <ø> (ø)
client/rpc/status.go 47.72% <ø> (ø)
client/rpc/validators.go 0.00% <ø> (ø)
client/test_helpers.go 0.00% <ø> (ø)
client/tx/factory.go 27.00% <ø> (ø)
... and 699 more

@aleem1314 aleem1314 added the S: DO NOT MERGE Status: DO NOT MERGE label Jun 16, 2021
@amaury1093
Copy link
Contributor

@aleem1314 is this R4R? rc0 is out so we can merge this.

@aleem1314 aleem1314 marked this pull request as ready for review June 28, 2021 08:48
@github-actions github-actions bot added the C:Keys Keybase, KMS and HSMs label Jun 28, 2021
@aleem1314 aleem1314 removed the S: DO NOT MERGE Status: DO NOT MERGE label Jun 28, 2021
Comment on lines +42 to +43
* (codec) [\#9521](https://github.com/cosmos/cosmos-sdk/pull/9521) Removed deprecated `clientCtx.JSONCodec` from `client.Context`.
* (codec) [\#9521](https://github.com/cosmos/cosmos-sdk/pull/9521) Rename `EncodingConfig.Marshaler` to `Codec`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I totally agree with those 2 changes, but otoh I also hear community feedback saying that there are too many breaking changes between releases.

So I'm not 100% sure of adding this change, imo it doesn't cost much to us to keep them deprecated, and give more time to app devs to adapt.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should do that for consistency. In the past we renamed Marshaler to Codec, and we forgot about renaming the part in EncodingConfig.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Then we might as well do it here and now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@alexanderbez - the related rename is part of the 0.43 release, we forgot to update EncodingConfig.

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.

I get the desire to remove JSONCodec, but why the renaming of Marshaler? Maybe we can limit the breaking change set as @AmauryM pointed out.

Copy link
Contributor

@blushi blushi left a comment

Choose a reason for hiding this comment

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

Pre-approving, I also agree we should keep things consistent, otherwise that might be even more confusing.

simapp/params/proto.go Outdated Show resolved Hide resolved
@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Jul 1, 2021
@mergify mergify bot merged commit d9fb4cf into master Jul 1, 2021
@mergify mergify bot deleted the aleem/9499-rename-cdc branch July 1, 2021 08:52
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
…rshaler` to `Codec` (cosmos#9521)

<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: cosmos#9499 

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### 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...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### 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...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove clientCtx.JSONCodec and rename EncodingConfig.Marshaler to Codec
5 participants