diff --git a/changelog.md b/changelog.md index b7812ca2e2..671d0adc3a 100644 --- a/changelog.md +++ b/changelog.md @@ -35,7 +35,8 @@ - [#4160](https://github.com/ignite/cli/pull/4160) Enable copyloopvar linter - [#4162](https://github.com/ignite/cli/pull/4162) Enable errcheck linter - [#4189](https://github.com/ignite/cli/pull/4189) Deprecate `ignite node` for `ignite connect` app -- [#4290](https://github.com/ignite/cli/pull/4290) Remove ignite consumer from ignite cli (this functionality will be in the `consumer` app) +- [#4290](https://github.com/ignite/cli/pull/4290) Remove ignite ics logic from ignite cli (this functionality will be in the `consumer` app) +- [#4295](https://github.com/ignite/cli/pull/4295) Stop scaffolding `pulsar` files ### Fixes diff --git a/go.mod b/go.mod index 6279d09b75..0281b8d8a0 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ require ( github.com/cometbft/cometbft v0.38.10 github.com/cosmos/cosmos-sdk v0.50.9 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.5.0 + github.com/cosmos/gogoproto v1.6.0 github.com/emicklei/proto v1.12.2 github.com/emicklei/proto-contrib v0.15.0 github.com/go-delve/delve v1.21.0 diff --git a/go.sum b/go.sum index a40df111a9..3b26f7f5a8 100644 --- a/go.sum +++ b/go.sum @@ -353,8 +353,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.5.0 h1:SDVwzEqZDDBoslaeZg+dGE55hdzHfgUA40pEanMh52o= -github.com/cosmos/gogoproto v1.5.0/go.mod h1:iUM31aofn3ymidYG6bUR5ZFrk+Om8p5s754eMUcyp8I= +github.com/cosmos/gogoproto v1.6.0 h1:Xm0F/96O5Ox4g6xGgjA41rWaaPjYtOdTi59uBcV2qEE= +github.com/cosmos/gogoproto v1.6.0/go.mod h1:Y+g956rcUf2vr4uwtCcK/1Xx9BWVluCtcI9vsh0GHmk= github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/ignite/cmd/scaffold_chain.go b/ignite/cmd/scaffold_chain.go index 3ae8973e72..9b45e1dbd7 100644 --- a/ignite/cmd/scaffold_chain.go +++ b/ignite/cmd/scaffold_chain.go @@ -90,7 +90,7 @@ about Cosmos SDK on https://docs.cosmos.network c.Flags().String(flagProtoDir, defaults.ProtoDir, "chain proto directory") // consumer scaffolding have been migrated to an ignite app - c.Flags().MarkDeprecated("consumer", "use 'ignite consumer' app instead") + _ = c.Flags().MarkDeprecated("consumer", "use 'ignite consumer' app instead") return c } diff --git a/ignite/pkg/cosmosanalysis/app/testdata/app_di.go b/ignite/pkg/cosmosanalysis/app/testdata/app_di.go index 180dbcf513..effb908a0b 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/app_di.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/app_di.go @@ -30,7 +30,6 @@ import ( "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" @@ -263,9 +262,6 @@ func NewSimApp( // RegisterUpgradeHandlers is used for registering any on-chain upgrades. app.RegisterUpgradeHandlers() - // add test gRPC service for testing gRPC queries in isolation - testdata_pulsar.RegisterQueryServer(app.GRPCQueryRouter(), testdata_pulsar.QueryImpl{}) - // create the simulation manager and define the order of the modules for deterministic simulations // // NOTE: this is not required apps that don't use the simulator for fuzz testing diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app_config.go b/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app_config.go index 1e9aca5a9e..9551653075 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app_config.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/app_config.go @@ -24,8 +24,8 @@ import ( txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" upgrademodulev1 "cosmossdk.io/api/cosmos/upgrade/module/v1" vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" - "cosmossdk.io/core/appconfig" "cosmossdk.io/depinject" + "cosmossdk.io/depinject/appconfig" _ "cosmossdk.io/x/circuit" // import for side-effects circuittypes "cosmossdk.io/x/circuit/types" _ "cosmossdk.io/x/evidence" // import for side-effects @@ -71,7 +71,6 @@ import ( ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" "google.golang.org/protobuf/types/known/durationpb" - marsmodulev1 "github.com/ignite/mars/api/mars/mars/module" _ "github.com/ignite/mars/x/mars" // import for side-effects marsmoduletypes "github.com/ignite/mars/x/mars/types" ) @@ -297,7 +296,7 @@ var ( }, { Name: marsmoduletypes.ModuleName, - Config: appconfig.WrapAny(&marsmodulev1.Module{}), + Config: appconfig.WrapAny(&marsmoduletypes.Module{}), }, // this line is used by starport scaffolding # stargate/app/moduleConfig }, diff --git a/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go b/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go index 7f50257e85..bdd134f5ab 100644 --- a/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go +++ b/ignite/pkg/cosmosanalysis/module/testdata/earth/app/app_config.go @@ -24,8 +24,8 @@ import ( txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" upgrademodulev1 "cosmossdk.io/api/cosmos/upgrade/module/v1" vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" - "cosmossdk.io/core/appconfig" "cosmossdk.io/depinject" + "cosmossdk.io/depinject/appconfig" _ "cosmossdk.io/x/circuit" // import for side-effects circuittypes "cosmossdk.io/x/circuit/types" _ "cosmossdk.io/x/evidence" // import for side-effects @@ -74,7 +74,6 @@ import ( ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" "google.golang.org/protobuf/types/known/durationpb" - marsmodulev1 "github.com/tendermint/mars/api/mars/mars/module" _ "github.com/tendermint/mars/x/mars" // import for side-effects marsmoduletypes "github.com/tendermint/mars/x/mars/types" ) @@ -305,7 +304,7 @@ var ( }, { Name: marsmoduletypes.ModuleName, - Config: appconfig.WrapAny(&marsmodulev1.Module{}), + Config: appconfig.WrapAny(&marsmoduletypes.Module{}), }, // this line is used by starport scaffolding # stargate/app/moduleConfig }, diff --git a/ignite/pkg/cosmosgen/cosmosgen.go b/ignite/pkg/cosmosgen/cosmosgen.go index 6235d736d9..c9e44a2337 100644 --- a/ignite/pkg/cosmosgen/cosmosgen.go +++ b/ignite/pkg/cosmosgen/cosmosgen.go @@ -65,7 +65,7 @@ func WithHooksGeneration(out ModulePathFunc, hooksRootPath string) Option { } } -// WithGoGeneration adds protobuf (gogoproto and pulsar) code generation. +// WithGoGeneration adds protobuf (gogoproto) code generation. func WithGoGeneration() Option { return func(o *generateOptions) { o.generateProtobuf = true @@ -165,10 +165,6 @@ func Generate(ctx context.Context, cacheStorage cache.Storage, appPath, protoDir if err := g.generateGoGo(ctx); err != nil { return err } - - if err := g.generatePulsar(ctx); err != nil { - return err - } } if g.opts.specOut != "" { diff --git a/ignite/pkg/cosmosgen/generate_go.go b/ignite/pkg/cosmosgen/generate_go.go index d661ff5c11..5647730fb9 100644 --- a/ignite/pkg/cosmosgen/generate_go.go +++ b/ignite/pkg/cosmosgen/generate_go.go @@ -15,20 +15,12 @@ func (g *generator) gogoTemplate() string { return filepath.Join(g.appPath, g.protoDir, "buf.gen.gogo.yaml") } -func (g *generator) pulsarTemplate() string { - return filepath.Join(g.appPath, g.protoDir, "buf.gen.pulsar.yaml") -} - func (g *generator) protoPath() string { return filepath.Join(g.appPath, g.protoDir) } func (g *generator) generateGoGo(ctx context.Context) error { - return g.generate(ctx, g.gogoTemplate(), g.goModPath, "*/module.proto") -} - -func (g *generator) generatePulsar(ctx context.Context) error { - return g.generate(ctx, g.pulsarTemplate(), "") + return g.generate(ctx, g.gogoTemplate(), g.goModPath) } func (g *generator) generate(ctx context.Context, template, fromPath string, excluded ...string) error { diff --git a/ignite/pkg/cosmosgen/generate_typescript.go b/ignite/pkg/cosmosgen/generate_typescript.go index cbc3872e94..dbb754728f 100644 --- a/ignite/pkg/cosmosgen/generate_typescript.go +++ b/ignite/pkg/cosmosgen/generate_typescript.go @@ -151,7 +151,6 @@ func (g *tsGenerator) generateModuleTemplate( protoPath, typesOut, g.g.tsTemplate(), - cosmosbuf.ExcludeFiles("module.proto"), cosmosbuf.IncludeWKT(), ); err != nil { return err diff --git a/ignite/pkg/cosmosgen/install.go b/ignite/pkg/cosmosgen/install.go index c45af9c374..fb7794a082 100644 --- a/ignite/pkg/cosmosgen/install.go +++ b/ignite/pkg/cosmosgen/install.go @@ -19,7 +19,6 @@ func DepTools() []string { // Go code generation plugin. "google.golang.org/grpc/cmd/protoc-gen-go-grpc", "google.golang.org/protobuf/cmd/protoc-gen-go", - "github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar", // grpc-gateway plugins. "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway", diff --git a/ignite/services/chain/init.go b/ignite/services/chain/init.go index 6a4e5fe3fe..d29b134d6f 100644 --- a/ignite/services/chain/init.go +++ b/ignite/services/chain/init.go @@ -174,16 +174,17 @@ func (c *Chain) InitAccounts(ctx context.Context, cfg *chainconfig.Config) error if len(cfg.Validators) == 0 { return nil } + if cfg.IsConsumerChain() { // we skip early if the chain is a consumer chain return nil - } else { - // Sovereign chain writes validators in gentxs. - _, err := c.IssueGentx(ctx, createValidatorFromConfig(cfg)) - if err != nil { - return err - } } + + // Sovereign chain writes validators in gentxs. + if _, err := c.IssueGentx(ctx, createValidatorFromConfig(cfg)); err != nil { + return err + } + return nil } diff --git a/ignite/services/scaffolder/configs.go b/ignite/services/scaffolder/configs.go index 40c35d7e03..943bfe0b77 100644 --- a/ignite/services/scaffolder/configs.go +++ b/ignite/services/scaffolder/configs.go @@ -16,7 +16,6 @@ func (s Scaffolder) CreateConfigs( moduleName string, configs ...string, ) error { - appName := s.modpath.Package // If no module is provided, we add the type to the app's module if moduleName == "" { moduleName = s.modpath.Package @@ -36,7 +35,7 @@ func (s Scaffolder) CreateConfigs( return errors.Errorf("the module %v not exist", moduleName) } - if err := checkConfigCreated(s.appPath, appName, moduleName, configs); err != nil { + if err := checkConfigCreated(s.appPath, moduleName, configs); err != nil { return err } @@ -64,8 +63,8 @@ func (s Scaffolder) CreateConfigs( } // checkConfigCreated checks if the config has been already created. -func checkConfigCreated(appPath, appName, moduleName string, configs []string) (err error) { - path := filepath.Join(appPath, "api", appName, moduleName, "module") +func checkConfigCreated(appPath, moduleName string, configs []string) (err error) { + path := filepath.Join(appPath, "x", moduleName, "module") ok, err := goanalysis.HasAnyStructFieldsInPkg(path, "Module", configs) if err != nil { return err diff --git a/ignite/templates/app/files-minimal/app/app.go.plush b/ignite/templates/app/files-minimal/app/app.go.plush index a663f01fa8..3cee9a8fc7 100644 --- a/ignite/templates/app/files-minimal/app/app.go.plush +++ b/ignite/templates/app/files-minimal/app/app.go.plush @@ -25,7 +25,6 @@ import ( "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" "github.com/cosmos/cosmos-sdk/types/module" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" diff --git a/ignite/templates/app/files-minimal/app/app_config.go.plush b/ignite/templates/app/files-minimal/app/app_config.go.plush index cd36f72089..56691873b5 100644 --- a/ignite/templates/app/files-minimal/app/app_config.go.plush +++ b/ignite/templates/app/files-minimal/app/app_config.go.plush @@ -10,7 +10,7 @@ import ( genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" - "cosmossdk.io/core/appconfig" + "cosmossdk.io/depinject/appconfig" upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/runtime" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" diff --git a/ignite/templates/app/files/app/app_config.go.plush b/ignite/templates/app/files/app/app_config.go.plush index df1a7977a8..9f49b41f09 100644 --- a/ignite/templates/app/files/app/app_config.go.plush +++ b/ignite/templates/app/files/app/app_config.go.plush @@ -25,7 +25,7 @@ import ( txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" upgrademodulev1 "cosmossdk.io/api/cosmos/upgrade/module/v1" vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" - "cosmossdk.io/core/appconfig" + "cosmossdk.io/depinject/appconfig" circuittypes "cosmossdk.io/x/circuit/types" evidencetypes "cosmossdk.io/x/evidence/types" "cosmossdk.io/x/feegrant" diff --git a/ignite/templates/app/files/go.mod.plush b/ignite/templates/app/files/go.mod.plush index 964229f2a8..833f838fcd 100644 --- a/ignite/templates/app/files/go.mod.plush +++ b/ignite/templates/app/files/go.mod.plush @@ -30,7 +30,7 @@ require ( github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.50.9 - github.com/cosmos/gogoproto v1.5.0 + github.com/cosmos/gogoproto v1.6.0 github.com/cosmos/ibc-go/modules/capability v1.0.0 github.com/cosmos/ibc-go/v8 v8.3.1 github.com/golang/protobuf v1.5.4 diff --git a/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml b/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml index 8d2c146014..f1af034c7f 100644 --- a/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml +++ b/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml @@ -9,8 +9,9 @@ plugins: out: . opt: - plugins=grpc - - Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types + - Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any - Mcosmos/orm/v1/orm.proto=cosmossdk.io/orm + - Mcosmos/app/v1alpha1/module.proto=cosmossdk.io/api/cosmos/app/v1alpha1 - name: grpc-gateway out: . opt: diff --git a/ignite/templates/app/files/{{protoDir}}/buf.gen.pulsar.yaml.plush b/ignite/templates/app/files/{{protoDir}}/buf.gen.pulsar.yaml.plush deleted file mode 100644 index b128e9403f..0000000000 --- a/ignite/templates/app/files/{{protoDir}}/buf.gen.pulsar.yaml.plush +++ /dev/null @@ -1,23 +0,0 @@ -# This file is auto-generated from Ignite. You can edit -# the file content but do not change the file name or path. -# -# buf.gen.pulsar.yaml -# -version: v1 -managed: - enabled: true - go_package_prefix: - default: <%= ModulePath %>/api - except: - - buf.build/googleapis/googleapis - - buf.build/cosmos/gogo-proto - - buf.build/cosmos/cosmos-proto - override: - buf.build/cosmos/cosmos-sdk: cosmossdk.io/api -plugins: - - name: go-pulsar - out: ./api - opt: paths=source_relative - - name: go-grpc - out: ./api - opt: paths=source_relative diff --git a/ignite/templates/module/create/base.go b/ignite/templates/module/create/base.go index 053c2a7731..dfa0ed32ee 100644 --- a/ignite/templates/module/create/base.go +++ b/ignite/templates/module/create/base.go @@ -89,10 +89,6 @@ func appConfigModify(replacer placeholder.Replacer, opts *CreateOptions) genny.R // Import content, err := xast.AppendImports( fConfig.String(), - xast.WithLastNamedImport( - fmt.Sprintf("%[1]vmodulev1", opts.ModuleName), - fmt.Sprintf("%[1]v/api/%[2]v/%[3]v/module/%[4]v", opts.ModulePath, opts.AppName, opts.ModuleName, opts.ProtoVer), - ), xast.WithLastNamedImport( "_", fmt.Sprintf("%[1]v/x/%[2]v/module", opts.ModulePath, opts.ModuleName), @@ -118,7 +114,7 @@ func appConfigModify(replacer placeholder.Replacer, opts *CreateOptions) genny.R template = `{ Name: %[2]vmoduletypes.ModuleName, - Config: appconfig.WrapAny(&%[2]vmodulev1.Module{}), + Config: appconfig.WrapAny(&%[2]vmoduletypes.Module{}), }, %[1]v` replacement = fmt.Sprintf(template, module.PlaceholderSgAppModuleConfig, opts.ModuleName) diff --git a/ignite/templates/module/create/files/base/api/{{appName}}/{{moduleName}}/module/{{protoVer}}/module.pulsar.go.plush b/ignite/templates/module/create/files/base/api/{{appName}}/{{moduleName}}/module/{{protoVer}}/module.pulsar.go.plush deleted file mode 100644 index b0b78bfd7a..0000000000 --- a/ignite/templates/module/create/files/base/api/{{appName}}/{{moduleName}}/module/{{protoVer}}/module.pulsar.go.plush +++ /dev/null @@ -1 +0,0 @@ -package module diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/autocli.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/autocli.go.plush index 4d15543c0b..85e55e546b 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/autocli.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/autocli.go.plush @@ -3,14 +3,14 @@ package <%= moduleName %> import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - modulev1 "<%= modulePath %>/api/<%= appName %>/<%= moduleName %>/<%= protoVer %>" + "<%= modulePath %>/x/<%= moduleName %>/types" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.ServiceCommandDescriptor{ - Service: modulev1.Query_ServiceDesc.ServiceName, + Service: types.Query_serviceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Params", @@ -21,7 +21,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: modulev1.Msg_ServiceDesc.ServiceName, + Service: types.Msg_serviceDesc.ServiceName, EnhanceCustomCommand: true, // only required if you want to use the custom command RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush index f39d646262..2b8dc966d7 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush @@ -6,9 +6,10 @@ import ( "fmt" "cosmossdk.io/core/address" - "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" + "cosmossdk.io/depinject/appconfig" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -25,7 +26,6 @@ import ( // this line is used by starport scaffolding # 1 - modulev1 "<%= modulePath %>/api/<%= appName %>/<%= moduleName %>/module/<%= protoVer %>" "<%= modulePath %>/x/<%= moduleName %>/keeper" "<%= modulePath %>/x/<%= moduleName %>/types" <%= if (isIBC) { %>"<%= modulePath %>/x/<%= moduleName %>/client/cli"<% } %> @@ -181,9 +181,9 @@ func (am AppModule) IsAppModule() {} // ---------------------------------------------------------------------------- func init() { - appmodule.Register( - &modulev1.Module{}, - appmodule.Provide(ProvideModule), + appconfig.Register( + &types.Module{}, + appconfig.Provide(ProvideModule), ) } @@ -193,7 +193,7 @@ type ModuleInputs struct { AddressCodec address.Codec StoreService store.KVStoreService Cdc codec.Codec - Config *modulev1.Module + Config *types.Module Logger log.Logger AccountKeeper types.AccountKeeper diff --git a/ignite/templates/module/create/files/base/{{protoDir}}/{{appName}}/{{moduleName}}/module/{{protoVer}}/module.proto.plush b/ignite/templates/module/create/files/base/{{protoDir}}/{{appName}}/{{moduleName}}/module/{{protoVer}}/module.proto.plush index cebfcb54b6..76c6230773 100644 --- a/ignite/templates/module/create/files/base/{{protoDir}}/{{appName}}/{{moduleName}}/module/{{protoVer}}/module.proto.plush +++ b/ignite/templates/module/create/files/base/{{protoDir}}/{{appName}}/{{moduleName}}/module/{{protoVer}}/module.proto.plush @@ -3,6 +3,8 @@ package <%= protoModulePkgName %>; import "cosmos/app/v1alpha1/module.proto"; +option go_package = "<%= modulePath %>/x/<%= moduleName %>/types"; + // Module is the config object for the module. message Module { option (cosmos.app.v1alpha1.module) = { diff --git a/integration/app/cmd_proto_path_test.go b/integration/app/cmd_proto_path_test.go index 71f976f891..ae2f207df1 100644 --- a/integration/app/cmd_proto_path_test.go +++ b/integration/app/cmd_proto_path_test.go @@ -5,7 +5,6 @@ package app_test import ( "os" "path/filepath" - "strings" "testing" "github.com/stretchr/testify/require" @@ -59,25 +58,6 @@ var ( } ) -// TestGenerateAppCheckBufPulsarPath tests scaffolding a new chain and checks if the buf.gen.pulsar.yaml file is correct. -func TestGenerateAppCheckBufPulsarPath(t *testing.T) { - var ( - env = envtest.New(t) - app = env.Scaffold("github.com/test/blog") - ) - - bufGenPulsarPath := filepath.Join(app.SourcePath(), "proto", "buf.gen.pulsar.yaml") - _, statErr := os.Stat(bufGenPulsarPath) - require.False(t, os.IsNotExist(statErr), "buf.gen.pulsar.yaml should be scaffolded") - - result, err := os.ReadFile(bufGenPulsarPath) - require.NoError(t, err) - - require.True(t, strings.Contains(string(result), "default: github.com/test/blog/api"), "buf.gen.pulsar.yaml should contain the correct api override") - - app.EnsureSteady() -} - func TestChangeProtoPath(t *testing.T) { var ( env = envtest.New(t) diff --git a/integration/doctor/testdata/config-ok.txt b/integration/doctor/testdata/config-ok.txt index 9a9bd6f9cc..3d564d4ae0 100644 --- a/integration/doctor/testdata/config-ok.txt +++ b/integration/doctor/testdata/config-ok.txt @@ -16,7 +16,6 @@ package tools import ( _ "github.com/bufbuild/buf/cmd/buf" - _ "github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar" _ "github.com/cosmos/gogoproto/protoc-gen-gocosmos" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" _ "google.golang.org/protobuf/cmd/protoc-gen-go" diff --git a/integration/doctor/testdata/existing-tools.go.txt b/integration/doctor/testdata/existing-tools.go.txt index 5685cd7743..e66f743779 100644 --- a/integration/doctor/testdata/existing-tools.go.txt +++ b/integration/doctor/testdata/existing-tools.go.txt @@ -18,7 +18,6 @@ package tools import ( _ "github.com/bufbuild/buf/cmd/buf" - _ "github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar" _ "github.com/cosmos/gogoproto/protoc-gen-gocosmos" _ "github.com/golang/protobuf/protoc-gen-go" _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" @@ -32,7 +31,6 @@ package tools import ( _ "github.com/bufbuild/buf/cmd/buf" - _ "github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar" _ "github.com/cosmos/gogoproto/protoc-gen-gocosmos" _ "github.com/golang/protobuf/protoc-gen-go" _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" diff --git a/integration/doctor/testdata/missing-tools.go.txt b/integration/doctor/testdata/missing-tools.go.txt index fc0759b578..d784542bf1 100644 --- a/integration/doctor/testdata/missing-tools.go.txt +++ b/integration/doctor/testdata/missing-tools.go.txt @@ -7,7 +7,6 @@ cmp tools.go.golden tools/tools.go exists go.sum # assert tools have been installed exists $GOPATH/bin/protoc-gen-gocosmos -exists $GOPATH/bin/protoc-gen-go-pulsar exists $GOPATH/bin/buf exists $GOPATH/bin/protoc-gen-grpc-gateway @@ -31,7 +30,6 @@ import ( _ "github.com/cosmos/gogoproto/protoc-gen-gocosmos" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" _ "google.golang.org/protobuf/cmd/protoc-gen-go" - _ "github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar" _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2" _ "golang.org/x/tools/cmd/goimports"