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 types/math aliases #16798

Merged
merged 5 commits into from
Jun 30, 2023
Merged

refactor!: remove types/math aliases #16798

merged 5 commits into from
Jun 30, 2023

Conversation

julienrbrt
Copy link
Member

Description

Closes: #14405
ref #16475 (comment)

  • Remove all aliases
  • Update & Re-generate protos to point to the right math
  • One small addition to protocgen.sh to re-generate all tests protos (one was missing)

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)

Copy link
Member Author

@julienrbrt julienrbrt Jun 30, 2023

Choose a reason for hiding this comment

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

I'll be tagging a new api module after this PR.
EDIT: not needed yet, let's wait instead.

CHANGELOG.md Outdated
@@ -243,8 +243,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
* `MsgSendExec` test helper function now takes a address.Codec
* (x/genutil) [#15567](https://github.com/cosmos/cosmos-sdk/pull/15567) `CollectGenTxsCmd` & `GenTxCmd` takes a address.Codec to be able to decode addresses
* (x/genutil) [#15999](https://github.com/cosmos/cosmos-sdk/pull/15999) Genutil now takes the `GenesisTxHanlder` interface instead of deliverTx. The interface is implemented on baseapp
* (types/math) [#16040](https://github.com/cosmos/cosmos-sdk/pull/16040) Remove unused aliases in math.go
* (x/gov) [#16106](https://github.com/cosmos/cosmos-sdk/pull/16106) Remove gRPC query methods from Keeper
* (types/math) [#16040](https://github.com/cosmos/cosmos-sdk/pull/16040) Remove aliases in `types/math.go`.
Copy link
Member Author

Choose a reason for hiding this comment

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

This changelog already exists, so I do not think we need another changelog for the final release however, for the alpha it may still be useful to have a changelog. We can collapse them at the final release.

NewInt = sdkmath.NewInt
ZeroInt = sdkmath.ZeroInt
)

func (ip IntProto) String() string {
Copy link
Member Author

@julienrbrt julienrbrt Jun 30, 2023

Choose a reason for hiding this comment

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

We could remove these if this is ACK: #15949
But this is out of scope of #14405 / #14405 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

lets do this in a folllow up

@julienrbrt julienrbrt disabled auto-merge June 30, 2023 16:49
@julienrbrt julienrbrt added this pull request to the merge queue Jun 30, 2023
Merged via the queue into main with commit 8c72f66 Jun 30, 2023
53 of 55 checks passed
@julienrbrt julienrbrt deleted the julien/math branch June 30, 2023 17:11
mergify bot pushed a commit that referenced this pull request Jun 30, 2023
(cherry picked from commit 8c72f66)

# Conflicts:
#	CHANGELOG.md
#	x/auth/migrations/v2/store.go
#	x/tx/signing/aminojson/internal/buf.lock
julienrbrt added a commit that referenced this pull request Jun 30, 2023
Co-authored-by: Julien Robert <julien@rbrt.fr>
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.

migrate usage of sdk.Math to cosmossdk.io/math
2 participants