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

chore: remove mint imports in the sdk #18307

Merged
merged 5 commits into from Oct 31, 2023
Merged

Conversation

tac0turtle
Copy link
Member

@tac0turtle tac0turtle commented Oct 30, 2023

Description

ref ##18290

this pr moves grpc server integration tests to the integration folder and removes importing of the mint module within the cosmos sdk root


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
  • run make lint and make test
  • 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)

Summary by CodeRabbit

Refactor:

  • Removed unused minttypes package import from baseapp/block_gas_test.go, baseapp/utils_test.go, and testutil/sims/address_helpers.go files, simplifying the codebase.
  • Introduced a new constant mintModuleName to replace minttypes.ModuleName in testutil/sims/address_helpers.go, enhancing code readability.

Please note, these changes do not affect the functionality of the application and are aimed at improving the code quality and maintainability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2023

Walkthrough

The changes primarily revolve around the removal of the minttypes package import across multiple files and the introduction of a new constant mintModuleName. The codebase now uses this constant instead of minttypes.ModuleName, with no significant alterations to the core structure or functionality of the code.

Changes

File Path Summary
baseapp/block_gas_test.go Removed minttypes import and added mintModuleName constant.
baseapp/utils_test.go Removed import of "mint" module.
testutil/sims/.../address_helpers.go Introduced mintModuleName constant, removed minttypes import, and updated initAccountWithCoins function to use the new constant.

Poem

🍂 As the autumn leaves fall, so does the minttypes call, 🍁

Replaced by mintModuleName, standing tall. 🏛️

No more imports, no more fuss, 🚫

Just a constant among us. 🐇

Celebrate the change, embrace the new, 🎉

CodeRabbit's here, coding with you. 🐰💻

So here's to the season, crisp and bright, 🌞

And to code that's clean, and light. 🍻


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.json

@tac0turtle tac0turtle changed the title choreL remove mint imports in the sdk chore: remove mint imports in the sdk Oct 30, 2023
@tac0turtle tac0turtle marked this pull request as ready for review October 30, 2023 19:39
@tac0turtle tac0turtle requested a review from a team as a code owner October 30, 2023 19:39
@github-prbot github-prbot requested review from a team, alexanderbez and testinginprod and removed request for a team October 30, 2023 19:39
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 15ccdcc and 619b44f.
Files selected for processing (3)
  • baseapp/block_gas_test.go (3 hunks)
  • baseapp/utils_test.go (1 hunks)
  • testutil/sims/address_helpers.go (2 hunks)
Files skipped from review due to trivial changes (3)
  • baseapp/block_gas_test.go
  • baseapp/utils_test.go
  • testutil/sims/address_helpers.go

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.

Can we remove the dep from the go.mod?

Copy link
Member

Choose a reason for hiding this comment

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

this is grpc server test, imho we should keep the subdir in integration as well

@tac0turtle
Copy link
Member Author

Can we remove the dep from the go.mod?

no because staking and bank import it, so we need to remove those or remove the dep of min in those in order to make this work.

@facundomedica
Copy link
Member

Running go-mod-tidy-all.sh produces lots of changes locally for me, maybe it's that what's making the build fail?

Copy link
Member

Choose a reason for hiding this comment

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

should be reverted.

@tac0turtle tac0turtle added this pull request to the merge queue Oct 31, 2023
Merged via the queue into main with commit f03b396 Oct 31, 2023
73 of 74 checks passed
@tac0turtle tac0turtle deleted the marko/remove_mint_usage branch October 31, 2023 10:32
atheeshp pushed a commit that referenced this pull request Nov 1, 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.

None yet

4 participants