-
Notifications
You must be signed in to change notification settings - Fork 547
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
feat: use buf.build
binary to generate the proto files
#3476
Conversation
# Conflicts: # go.mod
buf.build
binary to generate the proto filesbuf.build
binary to generate the proto files
# Conflicts: # ignite/cmd/model/chain_debug.go # ignite/cmd/model/chain_serve.go # ignite/pkg/cmdrunner/cmdrunner.go # ignite/pkg/cosmosgen/generate.go # ignite/pkg/cosmosgen/generate_openapi.go # ignite/pkg/cosmosgen/install.go # ignite/pkg/protoc/data/include/gogoproto/gogo.proto # ignite/templates/app/files/go.mod.plush # integration/doctor/testdata/config-ok.txt # integration/doctor/testdata/existing-tools.go.txt # integration/doctor/testdata/missing-tools.go.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had an error with ignite g ts-client
when running it on the latest commit of SPN. Looks like related to buf. Can you please take a look?
Also on SPN, shouldn't fundraising module auto discovered and added to the generated buf files?
The Buf migration was missing for the generate tools. It's fixed now |
ignite/pkg/buf/buf.go
Outdated
// can't download this folder because is unused as a dependency. We need to | ||
// change the workspace copying the files to another folder and generate the | ||
// files. | ||
if strings.Contains(protoDir, cosmosSDKModulePath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if strings.Contains(protoDir, cosmosSDKModulePath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilgooz, I made a double-check here. We can't remove this validation. Buf will solve the dependencies for the proto files. But we still need to go one by one of the Golang project dependencies and compile the proto files for the ts-client and open API spec generation. This workaround solves the issue regarding the invalid proto path (orm/internal
) download into the go mod
for cosmos-sdk buf workspace
- Code generation using protoc is only supported by Ignite CLI v0.26.1 or older Wait til ignite/cli#3476 is released Signed-off-by: Julian Strobl <[email protected]>
* build buf pkg * fix go.mod * comment xbug pkg and bump buf versions * generate proto from buf and remove protoc and plugins * add proto ts and api generation * add changelog * fix proto and template path * fix wrong template for ts generation * fix api out path * fix ts out path and remove unused log * fix go.mod ident and sort * remove unused method * fix lint * fix wrong lint comment * remove unused tools * fix doctor for tools pkg * add missing tool dependency * add missing import * add global protoanalysis.NewCache to buf structure * fix proto module name * update go.mod * Update ignite/pkg/cosmosgen/generate_go.go method name Co-authored-by: Jerónimo Albi <[email protected]> * Update ignite/pkg/buf/buf.go remove unused ctx Co-authored-by: Jerónimo Albi <[email protected]> * fix wrong method call * fix deep tools * fix ignite doctor * fix buf.gen files * fix proto gen files * remove 3thrparty mod * thr modules openapi * add xos copy commands * fix wrong proto tmp path * remove unused method * update tools for the doctor command * unhlanded error * check if the buf files exists * remove unused ctx * fix changelog merge * fix unit tests and make more dynamic * Update changelog Co-authored-by: İlker G. Öztürk <[email protected]> * fix ts script generation and remove pulsar buf files * fix changelog * fix changelog * add migration for scaffold and generate commands * fix pre handler * fix rance condition * fix wrong app path for tools migrations * fix lint * rollback draft changes * fix ineffassign lint * fix wrong path * move buf pkg to cosmosbuf * increase test timeout --------- Co-authored-by: Jerónimo Albi <[email protected]> Co-authored-by: İlker G. Öztürk <[email protected]> Co-authored-by: Danilo Pantani <[email protected]> Co-authored-by: Pantani <Pantani>
close #3458
buf
binary for you: