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: Use anyutil instead of any #15322

Merged
merged 5 commits into from
Mar 9, 2023
Merged

refactor: Use anyutil instead of any #15322

merged 5 commits into from
Mar 9, 2023

Conversation

amaury1093
Copy link
Contributor

Description

ref: cosmos/cosmos-proto#101


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)

@amaury1093 amaury1093 requested a review from a team as a code owner March 9, 2023 10:47
@github-actions github-actions bot added C:CLI C:collections C:Confix Issues and PR related to Confix C:Cosmovisor Issues and PR related to Cosmovisor C:Hubl Tool: Hubl C:orm C:Rosetta Issues and PR related to Rosetta C:x/circuit C:x/evidence C:x/feegrant C:x/nft C:x/tx C:x/upgrade labels Mar 9, 2023
@amaury1093 amaury1093 marked this pull request as draft March 9, 2023 10:47
@github-actions github-actions bot removed C:x/evidence C:CLI C:x/upgrade C:x/circuit C:Hubl Tool: Hubl C:Confix Issues and PR related to Confix C:Cosmovisor Issues and PR related to Cosmovisor C:collections C:Rosetta Issues and PR related to Rosetta C:x/feegrant C:x/nft labels Mar 9, 2023
@amaury1093 amaury1093 marked this pull request as ready for review March 9, 2023 11:09
Comment on lines +159 to +160
cosmossdk.io/core => ./core
cosmossdk.io/x/tx => ./x/tx
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's the process here to remove short-lived replaces? Should I tag a version right after, or wait a bit (given e.g. there are a lot of other changes in x/tx these days).

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, we remove these replaces by tagging a version from what I know. But IDK when we do that

Copy link
Contributor

Choose a reason for hiding this comment

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

just curious to know why are we using these replace directives here and other go mods ?

Copy link
Member

@julienrbrt julienrbrt Mar 9, 2023

Choose a reason for hiding this comment

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

Actually lately (for log, collections and math) we've been using pseudo version of the latest commit from main / the branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just curious to know why are we using these replace directives here and other go mods ?

Here are my steps to why I added them:

  • I replaced all any with anyutil in go code
  • it happened in sdk, core and x/tx
  • I bumped to beta.3 in sdk, core, and x/tx
  • I got an error saying that sdk imports core, which imports cosmos-proto (beta.2), which doesn't have anyutil
  • I added this replace and it worked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually lately (for log, collections and math) we've been using pseudo version of the latest commit from main / the branch.

Should I switch to a pseudo version of the latest commit of this branch? Not sure which is best compared to replace (I prefer the latter)

Copy link
Member

@julienrbrt julienrbrt Mar 9, 2023

Choose a reason for hiding this comment

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

I believe the reason with the first, and that it's one less PR (when we need not to miss a replace), and dependabot takes care of the rest if it's a pseudo version when we tag something.
However, it makes more clear with replace what still needs to be tagged 👍🏾

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

lgtm

@amaury1093 amaury1093 merged commit 6252e5d into main Mar 9, 2023
@amaury1093 amaury1093 deleted the am/anyutil branch March 9, 2023 13:24
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
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.

3 participants