Description
Summary
Rename some test_common.go
to common_test.go
Problem Definition
When trying to add querying of gen txs in auth/client/rest
I get the following import cycle:
package github.com/cosmos/cosmos-sdk/x/auth/client/rest
imports github.com/cosmos/cosmos-sdk/x/genutil/types
imports github.com/cosmos/cosmos-sdk/x/staking/types
imports github.com/cosmos/cosmos-sdk/x/supply
imports github.com/cosmos/cosmos-sdk/x/supply/internal/keeper
imports github.com/cosmos/cosmos-sdk/x/auth
imports github.com/cosmos/cosmos-sdk/x/auth/client/rest
This is because of test_common.go in supply. However test_common.go
has only private functions, meaning it is only used by test files within its package. Changing its name to common_test.go
gets rid of the import cycle because as a test file it won't be exported (which is fine since it has nothing is being exported in the first place). Other places with test_common.go
with no exported functions include: x/mint/internal/keeper
, x/distribution/client/common
, x/distribution/types
Proposal
Rename these files to common_test.go
. Alternatively these files could be reworked to try to get rid of the x/auth
dependencies, but I am not entirely sure if it is possible to completely remove the x/auth
dependency.
cc/ @fedekunze
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned