cli
cli copied to clipboard
feat: support custom proto path (backport #4071)
close #3979 close #4007
Description
Create a proto-dir flag for scaffold commands to use a different proto directory. This PR also manages the buf.work.yaml to be populated automatics depending on your proto directory
This is an automatic backport of pull request #4071 done by Mergify.
Cherry-pick of 6364ecbf6a354ad1907436ecd32e6f85fdd2fb39 has failed:
On branch mergify/bp/release/v28.x.y/pr-4071
Your branch is up to date with 'origin/release/v28.x.y'.
You are currently cherry-picking commit 6364ecbf.
(fix conflicts and run "git cherry-pick --continue")
(use "git cherry-pick --skip" to skip this patch)
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
Changes to be committed:
modified: changelog.md
new file: ignite/config/chain/defaults/default.go
modified: ignite/pkg/cosmosanalysis/app/app.go
modified: ignite/pkg/cosmosanalysis/cosmosanalysis.go
modified: ignite/pkg/cosmosbuf/buf.go
new file: ignite/pkg/cosmosbuf/config.go
modified: ignite/pkg/cosmosgen/generate_vuex.go
modified: ignite/pkg/repoversion/repoversion.go
new file: ignite/pkg/xembed/testdata/subtestdata/subfile.txt
new file: ignite/pkg/xembed/testdata/subtestdata/subtestdata/subfile2.txt
new file: ignite/pkg/xembed/testdata/test.txt
new file: ignite/pkg/xembed/xembed.go
new file: ignite/pkg/xembed/xembed_test.go
modified: ignite/services/chain/chain.go
modified: ignite/services/scaffolder/component.go
modified: ignite/services/scaffolder/patch.go
modified: ignite/templates/app/app.go
renamed: ignite/templates/app/files/buf.work.yaml -> ignite/templates/app/files/buf.work.yaml.plush
deleted: ignite/templates/app/files/proto/buf.gen.pulsar.yaml.plush
renamed: ignite/templates/app/files/proto/buf.gen.gogo.yaml -> ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml
renamed: ignite/templates/app/files/proto/buf.gen.sta.yaml -> ignite/templates/app/files/{{protoDir}}/buf.gen.sta.yaml
renamed: ignite/templates/app/files/proto/buf.gen.swagger.yaml -> ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml
renamed: ignite/templates/app/files/proto/buf.gen.ts.yaml -> ignite/templates/app/files/{{protoDir}}/buf.gen.ts.yaml
renamed: ignite/templates/app/files/proto/buf.lock -> ignite/templates/app/files/{{protoDir}}/buf.lock
renamed: ignite/templates/app/files/proto/buf.yaml -> ignite/templates/app/files/{{protoDir}}/buf.yaml
modified: ignite/templates/app/options.go
new file: ignite/templates/app/proto_test.go
modified: ignite/templates/ibc/packet.go
modified: ignite/templates/message/message.go
modified: ignite/templates/message/options.go
modified: ignite/templates/module/create/base.go
renamed: ignite/templates/module/create/files/base/proto/{{appName}}/{{moduleName}}/genesis.proto.plush -> ignite/templates/module/create/files/base/{{protoDir}}/{{appName}}/{{moduleName}}/genesis.proto.plush
renamed: ignite/templates/module/create/files/base/proto/{{appName}}/{{moduleName}}/module/module.proto.plush -> ignite/templates/module/create/files/base/{{protoDir}}/{{appName}}/{{moduleName}}/module/module.proto.plush
renamed: ignite/templates/module/create/files/base/proto/{{appName}}/{{moduleName}}/params.proto.plush -> ignite/templates/module/create/files/base/{{protoDir}}/{{appName}}/{{moduleName}}/params.proto.plush
renamed: ignite/templates/module/create/files/base/proto/{{appName}}/{{moduleName}}/query.proto.plush -> ignite/templates/module/create/files/base/{{protoDir}}/{{appName}}/{{moduleName}}/query.proto.plush
renamed: ignite/templates/module/create/files/ibc/proto/{{appName}}/{{moduleName}}/packet.proto.plush -> ignite/templates/module/create/files/ibc/{{protoDir}}/{{appName}}/{{moduleName}}/packet.proto.plush
renamed: ignite/templates/module/create/files/msgserver/proto/{{appName}}/{{moduleName}}/tx.proto.plush -> ignite/templates/module/create/files/msgserver/{{protoDir}}/{{appName}}/{{moduleName}}/tx.proto.plush
modified: ignite/templates/module/create/ibc.go
modified: ignite/templates/module/create/msgserver.go
modified: ignite/templates/query/options.go
modified: ignite/templates/query/query.go
renamed: ignite/templates/typed/dry/files/component/proto/{{appName}}/{{moduleName}}/{{typeName}}.proto.plush -> ignite/templates/typed/dry/files/component/{{protoDir}}/{{appName}}/{{moduleName}}/{{typeName}}.proto.plush
renamed: ignite/templates/typed/list/files/component/proto/{{appName}}/{{moduleName}}/{{typeName}}.proto.plush -> ignite/templates/typed/list/files/component/{{protoDir}}/{{appName}}/{{moduleName}}/{{typeName}}.proto.plush
modified: ignite/templates/typed/list/genesis.go
modified: ignite/templates/typed/list/list.go
renamed: ignite/templates/typed/map/files/component/proto/{{appName}}/{{moduleName}}/{{typeName}}.proto.plush -> ignite/templates/typed/map/files/component/{{protoDir}}/{{appName}}/{{moduleName}}/{{typeName}}.proto.plush
modified: ignite/templates/typed/map/map.go
modified: ignite/templates/typed/options.go
renamed: ignite/templates/typed/singleton/files/component/proto/{{appName}}/{{moduleName}}/{{typeName}}.proto.plush -> ignite/templates/typed/singleton/files/component/{{protoDir}}/{{appName}}/{{moduleName}}/{{typeName}}.proto.plush
modified: ignite/templates/typed/singleton/singleton.go
modified: ignite/templates/typed/typed.go
modified: integration/app/cmd_app_test.go
new file: integration/app/cmd_proto_path_test.go
modified: integration/relayer/cmd_relayer_test.go
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
both modified: go.mod
both modified: ignite/cmd/chain.go
both modified: ignite/cmd/cmd.go
both modified: ignite/cmd/scaffold.go
both modified: ignite/cmd/scaffold_chain.go
deleted by us: ignite/cmd/scaffold_configs.go
both modified: ignite/cmd/scaffold_message.go
both modified: ignite/cmd/scaffold_module.go
both modified: ignite/cmd/scaffold_package.go
deleted by us: ignite/cmd/scaffold_params.go
both modified: ignite/cmd/scaffold_query.go
both modified: ignite/config/chain/base/config.go
both modified: ignite/config/chain/parse.go
both modified: ignite/config/chain/v1/config.go
both modified: ignite/config/chain/v1/config_test.go
both modified: ignite/config/chain/v1/validator_servers.go
both modified: ignite/pkg/cosmosgen/generate.go
both modified: ignite/services/chain/proto.go
both modified: ignite/services/chain/serve.go
deleted by us: ignite/services/scaffolder/configs.go
both modified: ignite/services/scaffolder/init.go
both modified: ignite/services/scaffolder/message.go
both modified: ignite/services/scaffolder/module.go
both modified: ignite/services/scaffolder/packet.go
deleted by us: ignite/services/scaffolder/params.go
both modified: ignite/services/scaffolder/query.go
both modified: ignite/services/scaffolder/scaffolder.go
both modified: ignite/services/scaffolder/type.go
both deleted: ignite/templates/app/files/proto/buf.gen.pulsar.yaml
added by them: ignite/templates/app/files/{{protoDir}}/buf.gen.pulsar.yaml
added by us: ignite/templates/app/files/{{protoDir}}/buf.gen.pulsar.yaml.plush
both modified: ignite/templates/app/proto.go
deleted by us: ignite/templates/module/create/configs.go
both modified: ignite/templates/module/create/options.go
deleted by us: ignite/templates/module/create/params.go
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally