-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: restore runtime app API registered module discovery (#3785)
* fix: restore runtime app API registered modules * ci: fix lint issue with unused argument * tests: fix broken unit tests * ci: fix linting issue * feat: add support for IBC modules discovery This is a temporary feature that should be removed once IBC modules are injected inteas of being wired using the definitions from the scafolded app file `app/ibc.go`. * fix: correct issue that cause modules not to be discovered The removed snippet was not able to handle some Go import paths which were removed, like the IBC ones, also causing that the TS client generation was incomplete because of the missing modules. * feat(pkg/xstrings): add `StringBetween` function * fix: discover "cosmossdk.io/x" based packages proto files The "cosmossdk.io/x" Go packages MUST search proto files in the Cosmos SDK Go package because these packages don't have the proto files included so they can't be discovered. * feat(pkg/gocmd): add Go mod download support * feat(pkg/cosmosanalysis): add find module support * refactor(pkg/cosmosanalysis): change Cosmos SDK package path discovery Discovery changed to use go mod download instead of using Go's module path which might not be present in some context. * refactor: add filter function to remove duplicated modules * chore: TS template updates * fix: correct TS imports for generated "cosmossdk.io" module packages * tests: add unit tests for the new `pkg/gomodule` functions * refactor: add options to `pkg/cosmosanalysis` Discover function * fix: Update package.json template --------- Co-authored-by: Danilo Pantani <[email protected]> Co-authored-by: Clockwork <[email protected]>
- Loading branch information
1 parent
fb2b140
commit ab3f5c1
Showing
28 changed files
with
1,166 additions
and
300 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module app | ||
|
||
go 1.20 | ||
|
||
require ( | ||
cosmossdk.io/api v0.3.1 | ||
cosmossdk.io/core v0.5.1 | ||
cosmossdk.io/depinject v1.0.0-alpha.3 | ||
cosmossdk.io/errors v1.0.0-beta.7 | ||
cosmossdk.io/math v1.0.1 | ||
github.com/bufbuild/buf v1.23.1 | ||
github.com/cometbft/cometbft v0.37.2 | ||
github.com/cometbft/cometbft-db v0.8.0 | ||
github.com/cosmos/cosmos-proto v1.0.0-beta.2 | ||
github.com/cosmos/cosmos-sdk v0.47.3 | ||
github.com/cosmos/gogoproto v1.4.10 | ||
github.com/cosmos/ibc-go/v7 v7.2.0 | ||
github.com/golang/protobuf v1.5.3 | ||
github.com/gorilla/mux v1.8.0 | ||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 | ||
github.com/spf13/cast v1.5.1 | ||
github.com/spf13/cobra v1.7.0 | ||
github.com/spf13/pflag v1.0.5 | ||
github.com/stretchr/testify v1.8.4 | ||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 | ||
google.golang.org/grpc v1.55.0 | ||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 | ||
google.golang.org/protobuf v1.31.0 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
ignite/pkg/cosmosanalysis/app/testdata/modules/crescent/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module github.com/crescent-network/crescent/v5 | ||
|
||
go 1.18 | ||
|
||
require ( | ||
github.com/cosmos/cosmos-sdk v0.45.10 | ||
github.com/cosmos/ibc-go/v3 v3.4.0 | ||
github.com/gogo/protobuf v1.3.3 | ||
github.com/golang/mock v1.6.0 | ||
github.com/golang/protobuf v1.5.2 | ||
github.com/golangci/golangci-lint v1.50.1 | ||
github.com/gorilla/mux v1.8.0 | ||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0 | ||
github.com/rakyll/statik v0.1.7 | ||
github.com/regen-network/cosmos-proto v0.3.1 | ||
github.com/spf13/cast v1.5.0 | ||
github.com/spf13/cobra v1.6.0 | ||
github.com/spf13/pflag v1.0.5 | ||
github.com/stretchr/testify v1.8.0 | ||
github.com/tendermint/tendermint v0.34.22 | ||
github.com/tendermint/tm-db v0.6.7 | ||
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e | ||
google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c | ||
google.golang.org/grpc v1.50.1 | ||
google.golang.org/protobuf v1.28.1 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
ignite/pkg/cosmosanalysis/app/testdata/modules/gaia/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module github.com/cosmos/gaia/v14 | ||
|
||
go 1.20 | ||
|
||
require ( | ||
cosmossdk.io/errors v1.0.0 | ||
cosmossdk.io/math v1.2.0 | ||
github.com/cosmos/cosmos-sdk v0.45.16 | ||
github.com/cosmos/go-bip39 v1.0.0 | ||
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4 v4.1.1 | ||
github.com/cosmos/ibc-go/v4 v4.4.2 | ||
github.com/cosmos/interchain-security/v2 v2.0.0 | ||
github.com/gogo/protobuf v1.3.3 | ||
github.com/golang/protobuf v1.5.3 | ||
github.com/google/gofuzz v1.2.0 | ||
github.com/gorilla/mux v1.8.1 | ||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 | ||
github.com/ory/dockertest/v3 v3.10.0 | ||
github.com/rakyll/statik v0.1.7 | ||
github.com/spf13/cast v1.5.1 | ||
github.com/spf13/cobra v1.8.0 | ||
github.com/spf13/viper v1.17.0 | ||
github.com/stretchr/testify v1.8.4 | ||
github.com/tendermint/tendermint v0.34.27 | ||
github.com/tendermint/tm-db v0.6.7 | ||
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb | ||
google.golang.org/grpc v1.58.2 | ||
) |
33 changes: 33 additions & 0 deletions
33
ignite/pkg/cosmosanalysis/app/testdata/modules/juno/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module github.com/CosmosContracts/juno/v18 | ||
|
||
go 1.21 | ||
|
||
require ( | ||
cosmossdk.io/api v0.3.1 | ||
cosmossdk.io/errors v1.0.0 | ||
cosmossdk.io/log v1.2.1 | ||
cosmossdk.io/math v1.1.2 | ||
cosmossdk.io/tools/rosetta v0.2.1 | ||
github.com/CosmWasm/wasmd v0.45.0 | ||
github.com/CosmWasm/wasmvm v1.5.0 | ||
github.com/cometbft/cometbft v0.37.2 | ||
github.com/cometbft/cometbft-db v0.8.0 | ||
github.com/cosmos/cosmos-sdk v0.47.5 | ||
github.com/cosmos/gogoproto v1.4.10 | ||
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.1 | ||
github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.0.0 | ||
github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230803181732-7c8f814d3b79 | ||
github.com/cosmos/ibc-go/v7 v7.3.1 | ||
github.com/golang/protobuf v1.5.3 | ||
github.com/gorilla/mux v1.8.0 | ||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 | ||
github.com/prometheus/client_golang v1.16.0 | ||
github.com/skip-mev/pob v1.0.4 | ||
github.com/spf13/cast v1.5.1 | ||
github.com/spf13/cobra v1.7.0 | ||
github.com/spf13/viper v1.16.0 | ||
github.com/stretchr/testify v1.8.4 | ||
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 | ||
google.golang.org/grpc v1.58.3 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) |
Oops, something went wrong.