From c2b34d525f6696aa3bb1c426cbb182940cde41b6 Mon Sep 17 00:00:00 2001 From: Pantani Date: Sat, 20 Apr 2024 02:11:50 +0200 Subject: [PATCH 01/14] remove protoc --- ignite/pkg/cosmosanalysis/app/app.go | 1 - ignite/pkg/cosmosanalysis/cosmosanalysis.go | 2 - ignite/pkg/cosmosbuf/buf.go | 64 +++- ignite/pkg/cosmosgen/generate_go.go | 3 +- ignite/pkg/cosmosgen/generate_openapi.go | 50 +-- ignite/pkg/cosmosgen/generate_typescript.go | 89 ++---- ignite/pkg/cosmosgen/generate_vuex.go | 2 - ignite/pkg/cosmosgen/sta.go | 58 ++++ ignite/pkg/goanalysis/goanalysis.go | 1 - ignite/pkg/nodetime/nodetime.go | 9 - ignite/pkg/nodetime/programs/sta/sta.go | 147 --------- .../pkg/nodetime/programs/ts-proto/tsproto.go | 65 ---- ignite/pkg/protoc/protoc.go | 284 ------------------ ignite/pkg/repoversion/repoversion.go | 2 - .../app/files/proto/buf.gen.sta.yaml | 15 - 15 files changed, 137 insertions(+), 655 deletions(-) create mode 100644 ignite/pkg/cosmosgen/sta.go delete mode 100644 ignite/pkg/nodetime/programs/sta/sta.go delete mode 100644 ignite/pkg/nodetime/programs/ts-proto/tsproto.go delete mode 100644 ignite/pkg/protoc/protoc.go delete mode 100644 ignite/templates/app/files/proto/buf.gen.sta.yaml diff --git a/ignite/pkg/cosmosanalysis/app/app.go b/ignite/pkg/cosmosanalysis/app/app.go index eeda44dac9..cac4ba3036 100644 --- a/ignite/pkg/cosmosanalysis/app/app.go +++ b/ignite/pkg/cosmosanalysis/app/app.go @@ -237,7 +237,6 @@ func discoverRuntimeAppModules(chainRoot string) ([]string, error) { } return nil }) - if err != nil { return nil, err } diff --git a/ignite/pkg/cosmosanalysis/cosmosanalysis.go b/ignite/pkg/cosmosanalysis/cosmosanalysis.go index c316205dec..46e4f2f806 100644 --- a/ignite/pkg/cosmosanalysis/cosmosanalysis.go +++ b/ignite/pkg/cosmosanalysis/cosmosanalysis.go @@ -53,7 +53,6 @@ func DeepFindImplementation(modulePath string, interfaceList []string) (found [] found = append(found, currFound...) return nil }) - if err != nil { return nil, err } @@ -267,7 +266,6 @@ func FindAppFilePath(chainRoot string) (path string, err error) { return nil }) - if err != nil { return "", err } diff --git a/ignite/pkg/cosmosbuf/buf.go b/ignite/pkg/cosmosbuf/buf.go index 566bdcc7a6..931c094b4a 100644 --- a/ignite/pkg/cosmosbuf/buf.go +++ b/ignite/pkg/cosmosbuf/buf.go @@ -27,8 +27,47 @@ type ( sdkProtoDir string cache *protoanalysis.Cache } + + // genOptions represents the buf generate options. + genOptions struct { + flags map[string]string + excludeFiles []string + includeImports []string + } + + // GenOptions represents the buf generate options function. + GenOptions func(o *genOptions) ) +func newGenOptions() *genOptions { + return &genOptions{ + flags: make(map[string]string), + excludeFiles: make([]string, 0), + includeImports: make([]string, 0), + } +} + +// WithGenerateFlag provides flag options for the buf generate command. +func WithGenerateFlag(flag, value string) GenOptions { + return func(o *genOptions) { + o.flags[flag] = value + } +} + +// ExcludeFiles exclude proto files. +func ExcludeFiles(excludeFiles ...string) GenOptions { + return func(o *genOptions) { + o.excludeFiles = append(o.excludeFiles, excludeFiles...) + } +} + +// IncludeImports include proto import. +func IncludeImports(includeImports ...string) GenOptions { + return func(o *genOptions) { + o.includeImports = append(o.includeImports, includeImports...) + } +} + const ( binaryName = "buf" flagTemplate = "template" @@ -146,18 +185,19 @@ func (b Buf) Generate( protoDir, output, template string, - excludeFilename ...string, + options ...GenOptions, ) (err error) { - var ( - excluded = make(map[string]struct{}) - flags = map[string]string{ - flagTemplate: template, - flagOutput: output, - flagErrorFormat: fmtJSON, - flagLogFormat: fmtJSON, - } - ) - for _, file := range excludeFilename { + opts := newGenOptions() + for _, apply := range options { + apply(opts) + } + opts.flags[flagTemplate] = template + opts.flags[flagOutput] = output + opts.flags[flagErrorFormat] = fmtJSON + opts.flags[flagLogFormat] = fmtJSON + + excluded := make(map[string]struct{}) + for _, file := range opts.excludeFiles { excluded[file] = struct{}{} } @@ -197,7 +237,7 @@ func (b Buf) Generate( continue } - cmd, err := b.generateCommand(CMDGenerate, flags, file.Path) + cmd, err := b.generateCommand(CMDGenerate, opts.flags, file.Path) if err != nil { return err } diff --git a/ignite/pkg/cosmosgen/generate_go.go b/ignite/pkg/cosmosgen/generate_go.go index c8049c3134..8e3e56e0df 100644 --- a/ignite/pkg/cosmosgen/generate_go.go +++ b/ignite/pkg/cosmosgen/generate_go.go @@ -7,6 +7,7 @@ import ( "github.com/otiai10/copy" + "github.com/ignite/cli/v29/ignite/pkg/cosmosbuf" "github.com/ignite/cli/v29/ignite/pkg/errors" ) @@ -31,7 +32,7 @@ func (g *generator) generateGoGo(ctx context.Context) error { protoPath := filepath.Join(g.appPath, g.protoDir) // code generate for each module. - err = g.buf.Generate(ctx, protoPath, tmp, g.gogoTemplate(), "module.proto") + err = g.buf.Generate(ctx, protoPath, tmp, g.gogoTemplate(), cosmosbuf.ExcludeFiles("module.proto")) if err != nil { return err } diff --git a/ignite/pkg/cosmosgen/generate_openapi.go b/ignite/pkg/cosmosgen/generate_openapi.go index ebc029f6c3..74d3c9ffd3 100644 --- a/ignite/pkg/cosmosgen/generate_openapi.go +++ b/ignite/pkg/cosmosgen/generate_openapi.go @@ -10,6 +10,7 @@ import ( "github.com/ignite/cli/v29/ignite/pkg/cache" "github.com/ignite/cli/v29/ignite/pkg/cosmosanalysis/module" + "github.com/ignite/cli/v29/ignite/pkg/cosmosbuf" "github.com/ignite/cli/v29/ignite/pkg/dirchange" "github.com/ignite/cli/v29/ignite/pkg/errors" swaggercombine "github.com/ignite/cli/v29/ignite/pkg/swagger-combine" @@ -25,10 +26,6 @@ func (g *generator) openAPITemplate() string { return filepath.Join(g.appPath, g.protoDir, "buf.gen.swagger.yaml") } -func (g *generator) openAPITemplateForSTA() string { - return filepath.Join(g.appPath, g.protoDir, "buf.gen.sta.yaml") -} - func (g *generator) generateOpenAPISpec(ctx context.Context) error { var ( specDirs []string @@ -72,7 +69,7 @@ func (g *generator) generateOpenAPISpec(ctx context.Context) error { } hasAnySpecChanged = true - err = g.buf.Generate(ctx, m.Pkg.Path, dir, g.openAPITemplate(), "module.proto") + err = g.buf.Generate(ctx, m.Pkg.Path, dir, g.openAPITemplate(), cosmosbuf.ExcludeFiles("module.proto")) if err != nil { return err } @@ -144,46 +141,3 @@ func (g *generator) generateOpenAPISpec(ctx context.Context) error { return dirchange.SaveDirChecksum(specCache, out, g.appPath, out) } - -// generateModuleOpenAPISpec generates a spec for a module where it's source code resides at src. -// and adds needed swaggercombine configure for it. -func (g *generator) generateModuleOpenAPISpec(ctx context.Context, m module.Module, out string) error { - var ( - specDirs []string - title = "HTTP API Console " + m.Pkg.Name - conf = swaggercombine.New(title, g.gomodPath) - ) - defer func() { - for _, dir := range specDirs { - os.RemoveAll(dir) - } - }() - - // generate specs for each module and persist them in the file system - // after add their path and config to swaggercombine.Config so we can combine them - // into a single spec. - dir, err := os.MkdirTemp("", "gen-openapi-module-spec") - if err != nil { - return err - } - - err = g.buf.Generate(ctx, m.Pkg.Path, dir, g.openAPITemplateForSTA(), "module.proto") - if err != nil { - return err - } - - specs, err := xos.FindFiles(dir, xos.JSONFile) - if err != nil { - return err - } - - for _, spec := range specs { - if err := conf.AddSpec(strcase.ToCamel(m.Pkg.Name), spec, false); err != nil { - return err - } - } - specDirs = append(specDirs, dir) - - // combine specs into one and save to out. - return conf.Combine(out) -} diff --git a/ignite/pkg/cosmosgen/generate_typescript.go b/ignite/pkg/cosmosgen/generate_typescript.go index 66d5f65179..7fb66462cf 100644 --- a/ignite/pkg/cosmosgen/generate_typescript.go +++ b/ignite/pkg/cosmosgen/generate_typescript.go @@ -11,17 +11,12 @@ import ( "github.com/ignite/cli/v29/ignite/pkg/cache" "github.com/ignite/cli/v29/ignite/pkg/cosmosanalysis/module" + "github.com/ignite/cli/v29/ignite/pkg/cosmosbuf" "github.com/ignite/cli/v29/ignite/pkg/dirchange" "github.com/ignite/cli/v29/ignite/pkg/gomodulepath" - "github.com/ignite/cli/v29/ignite/pkg/nodetime/programs/sta" - tsproto "github.com/ignite/cli/v29/ignite/pkg/nodetime/programs/ts-proto" - "github.com/ignite/cli/v29/ignite/pkg/protoc" ) -var ( - dirchangeCacheNamespace = "generate.typescript.dirchange" - tsOut = []string{"--ts_proto_out=."} -) +var dirchangeCacheNamespace = "generate.typescript.dirchange" type tsGenerator struct { g *generator @@ -37,6 +32,10 @@ func newTSGenerator(g *generator) *tsGenerator { return &tsGenerator{g} } +func (g *generator) tsTemplate() string { + return filepath.Join(g.appPath, g.protoDir, "buf.gen.ts.yaml") +} + func (g *generator) generateTS(ctx context.Context) error { chainPath, _, err := gomodulepath.Find(g.appPath) if err != nil { @@ -78,26 +77,6 @@ func (g *generator) generateTS(ctx context.Context) error { } func (g *tsGenerator) generateModuleTemplates(ctx context.Context) error { - protocCmd, cleanupProtoc, err := protoc.Command() - if err != nil { - return err - } - - defer cleanupProtoc() - - tsprotoPluginPath, cleanupPlugin, err := tsproto.BinaryPath() - if err != nil { - return err - } - - defer cleanupPlugin() - - staCmd, cleanupSTA, err := sta.Command() - if err != nil { - return err - } - - defer cleanupSTA() gg := &errgroup.Group{} dirCache := cache.New[[]byte](g.g.cacheStorage, dirchangeCacheNamespace) add := func(sourcePath string, modules []module.Module, includes []string) { @@ -122,8 +101,7 @@ func (g *tsGenerator) generateModuleTemplates(ctx context.Context) error { } } - err = g.generateModuleTemplate(ctx, protocCmd, staCmd, tsprotoPluginPath, sourcePath, m, includes) - if err != nil { + if err := g.generateModuleTemplate(ctx, sourcePath, m, includes); err != nil { return err } @@ -150,9 +128,6 @@ func (g *tsGenerator) generateModuleTemplates(ctx context.Context) error { func (g *tsGenerator) generateModuleTemplate( ctx context.Context, - protocCmd protoc.Cmd, - staCmd sta.Cmd, - tsprotoPluginPath, appPath string, m module.Module, includePaths []string, @@ -164,48 +139,30 @@ func (g *tsGenerator) generateModuleTemplate( if err := os.MkdirAll(typesOut, 0o766); err != nil { return err } - - // generate ts-proto types - err := protoc.Generate( - ctx, - typesOut, - m.Pkg.Path, - includePaths, - tsOut, - protoc.Plugin(tsprotoPluginPath, "--ts_proto_opt=snakeToCamel=true", "--ts_proto_opt=esModuleInterop=true"), - protoc.Env("NODE_OPTIONS="), // unset nodejs options to avoid unexpected issues with vercel "pkg" - protoc.WithCommand(protocCmd), - ) - if err != nil { - return err - } - - specPath := filepath.Join(out, "api.swagger.yml") - - if err = g.g.generateModuleOpenAPISpec(ctx, m, specPath); err != nil { - return err - } - // generate the REST client from the OpenAPI spec - - var ( - srcSpec = specPath - outREST = filepath.Join(out, "rest.ts") - ) - - if err := sta.Generate(ctx, outREST, srcSpec, sta.WithCommand(staCmd)); err != nil { + if err := generateRouteNameFile(typesOut); err != nil { return err } // All "cosmossdk.io" module packages must use SDK's // proto path which is where the proto files are stored. - var pp string + protoPath := filepath.Join(g.g.appPath, g.g.protoDir) if module.IsCosmosSDKModulePkg(appPath) { - pp = filepath.Join(g.g.sdkDir, "proto") - } else { - pp = filepath.Join(appPath, g.g.protoDir) + protoPath = filepath.Join(g.g.sdkDir, "proto") + } + + // code generate for each module. + if err := g.g.buf.Generate( + ctx, + protoPath, + typesOut, + g.g.tsTemplate(), + cosmosbuf.ExcludeFiles("module.proto"), + cosmosbuf.IncludeImports(includePaths...), + ); err != nil { + return err } - return templateTSClientModule.Write(out, pp, struct { + return templateTSClientModule.Write(out, protoPath, struct { Module module.Module }{ Module: m, diff --git a/ignite/pkg/cosmosgen/generate_vuex.go b/ignite/pkg/cosmosgen/generate_vuex.go index 5add23c832..160a4c653d 100644 --- a/ignite/pkg/cosmosgen/generate_vuex.go +++ b/ignite/pkg/cosmosgen/generate_vuex.go @@ -69,7 +69,6 @@ func (g *generator) updateVueDependencies() error { tsClientName: fmt.Sprintf("file:%s", tsClientVueRelPath), }, }) - if err != nil { return errors.Errorf("failed to link ts-client dependency to the Vue app: %w", err) } @@ -136,7 +135,6 @@ func (g *generator) updateVuexDependencies() error { tsClientName: fmt.Sprintf("file:%s", tsClientVuexRelPath), }, }) - if err != nil { return errors.Errorf("failed to link ts-client dependency to the Vuex stores: %w", err) } diff --git a/ignite/pkg/cosmosgen/sta.go b/ignite/pkg/cosmosgen/sta.go new file mode 100644 index 0000000000..0d72a6df50 --- /dev/null +++ b/ignite/pkg/cosmosgen/sta.go @@ -0,0 +1,58 @@ +package cosmosgen + +import ( + "os" + "path/filepath" +) + +const routeNameTemplate = `<% +const { routeInfo, utils } = it; +const { + operationId, + method, + route, + moduleName, + responsesTypes, + description, + tags, + summary, + pathArgs, +} = routeInfo; +const { _, fmtToJSDocLine, require } = utils; + +const methodAliases = { + get: (pathName, hasPathInserts) => + _.camelCase(` + "`" + `${pathName}_${hasPathInserts ? "detail" : "list"}` + "`" + `), + post: (pathName, hasPathInserts) => _.camelCase(` + "`" + `${pathName}_create` + "`" + `), + put: (pathName, hasPathInserts) => _.camelCase(` + "`" + `${pathName}_update` + "`" + `), + patch: (pathName, hasPathInserts) => _.camelCase(` + "`" + `${pathName}_partial_update` + "`" + `), + delete: (pathName, hasPathInserts) => _.camelCase(` + "`" + `${pathName}_delete` + "`" + `), +}; + +const createCustomOperationId = (method, route, moduleName) => { + const hasPathInserts = /\{(\w){1,}\}/g.test(route); + const splitedRouteBySlash = _.compact(_.replace(route, /\{(\w){1,}\}/g, "").split("/")); + const routeParts = (splitedRouteBySlash.length > 1 + ? splitedRouteBySlash.splice(1) + : splitedRouteBySlash + ).join("_"); + return routeParts.length > 3 && methodAliases[method] + ? methodAliases[method](routeParts, hasPathInserts) + : _.camelCase(_.lowerCase(method) + "_" + [moduleName].join("_")) || "index"; +}; + +if (operationId) { + let routeName = operationId.replace('_',''); + return routeName[0].toLowerCase() + routeName.slice(1); +} +if (route === "/") + return _.camelCase(` + "`" + `${_.lowerCase(method)}Root` + "`" + `); + +return createCustomOperationId(method, route, moduleName); +%>` + +// generateRouteNameFile generates the `route-name.eta` file. +func generateRouteNameFile(outPath string) error { + outTemplate := filepath.Join(outPath, "route-name.eta") + return os.WriteFile(outTemplate, []byte(routeNameTemplate), 0o644) +} diff --git a/ignite/pkg/goanalysis/goanalysis.go b/ignite/pkg/goanalysis/goanalysis.go index d219f1d5ed..d0e6c30c55 100644 --- a/ignite/pkg/goanalysis/goanalysis.go +++ b/ignite/pkg/goanalysis/goanalysis.go @@ -45,7 +45,6 @@ func DiscoverMain(path string) (pkgPaths []string, err error) { return nil }) - if err != nil { return nil, err } diff --git a/ignite/pkg/nodetime/nodetime.go b/ignite/pkg/nodetime/nodetime.go index 572e7da305..41716055f5 100644 --- a/ignite/pkg/nodetime/nodetime.go +++ b/ignite/pkg/nodetime/nodetime.go @@ -17,15 +17,6 @@ import ( // the list of CLIs included. const ( - // CommandTSProto is https://github.com/stephenh/ts-proto. - CommandTSProto CommandName = "ts-proto" - - // CommandSTA is https://github.com/acacode/swagger-typescript-api. - CommandSTA CommandName = "sta" - - // CommandSwaggerCombine is https://www.npmjs.com/package/swagger-combine. - CommandSwaggerCombine CommandName = "swagger-combine" - // CommandIBCSetup is https://github.com/confio/ts-relayer/blob/main/spec/ibc-setup.md. CommandIBCSetup = "ibc-setup" diff --git a/ignite/pkg/nodetime/programs/sta/sta.go b/ignite/pkg/nodetime/programs/sta/sta.go deleted file mode 100644 index 6995e69959..0000000000 --- a/ignite/pkg/nodetime/programs/sta/sta.go +++ /dev/null @@ -1,147 +0,0 @@ -// Package sta provides access to swagger-typescript-api CLI. -package sta - -import ( - "context" - "os" - "path/filepath" - - "github.com/ignite/cli/v29/ignite/pkg/cmdrunner/exec" - "github.com/ignite/cli/v29/ignite/pkg/nodetime" -) - -// Option configures Generate configs. -type Option func(*configs) - -// Configs holds Generate configs. -type configs struct { - command Cmd -} - -const routeNameTemplate = `<% -const { routeInfo, utils } = it; -const { - operationId, - method, - route, - moduleName, - responsesTypes, - description, - tags, - summary, - pathArgs, -} = routeInfo; -const { _, fmtToJSDocLine, require } = utils; - -const methodAliases = { - get: (pathName, hasPathInserts) => - _.camelCase(` + "`" + `${pathName}_${hasPathInserts ? "detail" : "list"}` + "`" + `), - post: (pathName, hasPathInserts) => _.camelCase(` + "`" + `${pathName}_create` + "`" + `), - put: (pathName, hasPathInserts) => _.camelCase(` + "`" + `${pathName}_update` + "`" + `), - patch: (pathName, hasPathInserts) => _.camelCase(` + "`" + `${pathName}_partial_update` + "`" + `), - delete: (pathName, hasPathInserts) => _.camelCase(` + "`" + `${pathName}_delete` + "`" + `), -}; - -const createCustomOperationId = (method, route, moduleName) => { - const hasPathInserts = /\{(\w){1,}\}/g.test(route); - const splitedRouteBySlash = _.compact(_.replace(route, /\{(\w){1,}\}/g, "").split("/")); - const routeParts = (splitedRouteBySlash.length > 1 - ? splitedRouteBySlash.splice(1) - : splitedRouteBySlash - ).join("_"); - return routeParts.length > 3 && methodAliases[method] - ? methodAliases[method](routeParts, hasPathInserts) - : _.camelCase(_.lowerCase(method) + "_" + [moduleName].join("_")) || "index"; -}; - -if (operationId) { - let routeName = operationId.replace('_',''); - return routeName[0].toLowerCase() + routeName.slice(1); -} -if (route === "/") - return _.camelCase(` + "`" + `${_.lowerCase(method)}Root` + "`" + `); - -return createCustomOperationId(method, route, moduleName); -%>` - -// WithCommand assigns a typescript API generator command to use for code generation. -// This allows to use a single nodetime STA generator binary in multiple code generation -// calls. Otherwise, `Generate` creates a new generator binary each time it is called. -func WithCommand(command Cmd) Option { - return func(c *configs) { - c.command = command - } -} - -// Cmd contains the information necessary to execute the typescript API generator command. -type Cmd struct { - command []string -} - -// Command returns the strings to execute the typescript API generator command. -func (c Cmd) Command() []string { - return c.command -} - -// Command sets the typescript API generator binary up and returns the command needed to execute it. -func Command() (command Cmd, cleanup func(), err error) { - c, cleanup, err := nodetime.Command(nodetime.CommandSTA) - command = Cmd{c} - return -} - -// Generate generates client code and TS types to outPath from an OpenAPI spec that resides at specPath. -func Generate(ctx context.Context, outPath, specPath string, options ...Option) error { - c := configs{} - - for _, o := range options { - o(&c) - } - - command := c.command.Command() - if command == nil { - cmd, cleanup, err := Command() - if err != nil { - return err - } - - defer cleanup() - - command = cmd.Command() - } - - dir := filepath.Dir(outPath) - file := filepath.Base(outPath) - - // generate temp template directory - templateTmpPath, err := os.MkdirTemp("", "gen-js-sta-templates") - if err != nil { - return err - } - - outTemplate := filepath.Join(templateTmpPath, "route-name.eta") - err = os.WriteFile(outTemplate, []byte(routeNameTemplate), 0o644) - if err != nil { - return err - } - - defer os.RemoveAll(templateTmpPath) - - // command constructs the sta command. - command = append(command, []string{ - "--axios", - "--module-name-index", - "-1", // -1 removes the route namespace - "-p", - specPath, - "--templates", - templateTmpPath, - "-o", - dir, - "-n", - file, - }...) - - // execute the command. - return exec.Exec(ctx, command, exec.IncludeStdLogsToError()) -} diff --git a/ignite/pkg/nodetime/programs/ts-proto/tsproto.go b/ignite/pkg/nodetime/programs/ts-proto/tsproto.go deleted file mode 100644 index bce4979f7c..0000000000 --- a/ignite/pkg/nodetime/programs/ts-proto/tsproto.go +++ /dev/null @@ -1,65 +0,0 @@ -// Package tsproto provides access to protoc-gen-ts_proto protoc plugin. -package tsproto - -import ( - "fmt" - "os" - "path/filepath" - "strings" - - "github.com/ignite/cli/v29/ignite/pkg/nodetime" -) - -const ( - pluginName = "protoc-gen-ts_proto" - scriptTemplate = "#!/bin/bash\n%s $@\n" -) - -// BinaryPath returns the path to the binary of the ts-proto plugin, so it can be passed to -// protoc via --plugin option. -// -// protoc is very picky about binary names of its plugins. for ts-proto, binary name -// will be protoc-gen-ts_proto. -// see why: https://github.com/stephenh/ts-proto/blob/7f76c05/README.markdown#quickstart. -func BinaryPath() (path string, cleanup func(), err error) { - // Create binary for the TypeScript protobuf generator - command, cleanupBin, err := nodetime.Command(nodetime.CommandTSProto) - if err != nil { - return path, cleanup, err - } - - defer func() { - if err != nil { - cleanupBin() - } - }() - - // Create a random directory for the script that runs the TypeScript protobuf generator. - // This is required to avoid potential flaky integration tests caused by one concurrent - // test overwriting the generator script while it is being run in a separate test process. - tmpDir, err := os.MkdirTemp("", "ts_proto_plugin") - if err != nil { - return path, cleanup, err - } - - cleanupScriptDir := func() { os.RemoveAll(tmpDir) } - - defer func() { - if err != nil { - cleanupScriptDir() - } - }() - - cleanup = func() { - cleanupBin() - cleanupScriptDir() - } - - // Wrap the TypeScript protobuf generator in a script with a fixed name - // located in a random temporary directory. - script := fmt.Sprintf(scriptTemplate, strings.Join(command, " ")) - path = filepath.Join(tmpDir, pluginName) - err = os.WriteFile(path, []byte(script), 0o755) - - return path, cleanup, err -} diff --git a/ignite/pkg/protoc/protoc.go b/ignite/pkg/protoc/protoc.go deleted file mode 100644 index 30d2c894a8..0000000000 --- a/ignite/pkg/protoc/protoc.go +++ /dev/null @@ -1,284 +0,0 @@ -// Package protoc provides high level access to protoc command. -package protoc - -import ( - "archive/tar" - "bytes" - "compress/gzip" - "context" - "io" - "os" - "path/filepath" - "strings" - - "github.com/ignite/ignite-files/protoc" - - "github.com/ignite/cli/v29/ignite/pkg/cmdrunner/exec" - "github.com/ignite/cli/v29/ignite/pkg/cmdrunner/step" - "github.com/ignite/cli/v29/ignite/pkg/errors" - "github.com/ignite/cli/v29/ignite/pkg/localfs" - "github.com/ignite/cli/v29/ignite/pkg/protoanalysis" -) - -// Option configures Generate configs. -type Option func(*configs) - -// configs holds Generate configs. -type configs struct { - pluginPath string - isGeneratedDepsEnabled bool - pluginOptions []string - env []string - command Cmd -} - -// Plugin configures a plugin for code generation. -func Plugin(path string, options ...string) Option { - return func(c *configs) { - c.pluginPath = path - c.pluginOptions = options - } -} - -// GenerateDependencies enables code generation for the proto files that your protofile depends on. -// use this if your protoc plugin does not give you an option to enable the same feature. -func GenerateDependencies() Option { - return func(c *configs) { - c.isGeneratedDepsEnabled = true - } -} - -// Env assigns environment values during the code generation. -func Env(v ...string) Option { - return func(c *configs) { - c.env = v - } -} - -// WithCommand assigns a protoc command to use for code generation. -// This allows to use a single protoc binary in multiple code generation calls. -// Otherwise, `Generate` creates a new protoc binary each time it is called. -func WithCommand(command Cmd) Option { - return func(c *configs) { - c.command = command - } -} - -// Cmd contains the information necessary to execute the protoc command. -type Cmd struct { - command []string - includes []string -} - -// Command returns the strings to execute the `protoc` command. -func (c Cmd) Command() []string { - return c.command -} - -// Includes returns the proto files import paths. -func (c Cmd) Includes() []string { - return c.includes -} - -// Command sets the protoc binary up and returns the command needed to execute c. -func Command() (command Cmd, cleanup func(), err error) { - // Unpack binary content - gzr, err := gzip.NewReader(bytes.NewReader(protoc.Binary())) - if err != nil { - return Cmd{}, nil, err - } - - defer gzr.Close() - - // Unarchive binary content - tr := tar.NewReader(gzr) - if _, err := tr.Next(); err != nil { - return Cmd{}, nil, err - } - - binary, err := io.ReadAll(tr) - if err != nil { - return Cmd{}, nil, err - } - - path, cleanupProto, err := localfs.SaveBytesTemp(binary, "protoc", 0o755) - if err != nil { - return Cmd{}, nil, err - } - - include, cleanupInclude, err := localfs.SaveTemp(protoc.Include()) - if err != nil { - cleanupProto() - return Cmd{}, nil, err - } - - cleanup = func() { - cleanupProto() - cleanupInclude() - } - - command = Cmd{ - command: []string{path, "-I", include}, - includes: []string{include}, - } - - return command, cleanup, nil -} - -// Generate generates code into outDir from protoPath and its includePaths by using plugins provided with protocOuts. -func Generate(ctx context.Context, outDir, protoPath string, includePaths, protocOuts []string, options ...Option) error { - c := configs{} - - for _, o := range options { - o(&c) - } - - // init the string to run the protoc command and the proto files import path - command := c.command.Command() - includes := c.command.Includes() - - if command == nil { - cmd, cleanup, err := Command() - if err != nil { - return err - } - - defer cleanup() - - command = cmd.Command() - includes = cmd.Includes() - } - // See: https://github.com/ignite/cli/issues/3698 - command = append(command, "--experimental_allow_proto3_optional") - - // add plugin if set. - if c.pluginPath != "" { - command = append(command, "--plugin", c.pluginPath) - } - var existentIncludePaths []string - - // skip if a third party proto source actually doesn't exist on the filesystem. - for _, path := range includePaths { - if _, err := os.Stat(path); os.IsNotExist(err) { - continue - } - existentIncludePaths = append(existentIncludePaths, path) - } - - // append third party proto locations to the command. - for _, importPath := range existentIncludePaths { - command = append(command, "-I", importPath) - } - - // find out the list of proto files to generate code for and perform code generation. - files, err := discoverFiles(ctx, c, protoPath, append(includes, existentIncludePaths...), protoanalysis.NewCache()) - if err != nil { - return err - } - - // run command for each protocOuts. - for _, out := range protocOuts { - command := append(command, out) - command = append(command, files...) - command = append(command, c.pluginOptions...) - - execOpts := []exec.Option{ - exec.StepOption(step.Workdir(outDir)), - exec.IncludeStdLogsToError(), - } - if c.env != nil { - execOpts = append(execOpts, exec.StepOption(step.Env(c.env...))) - } - - if err := exec.Exec(ctx, command, execOpts...); err != nil { - return err - } - } - - return nil -} - -// discoverFiles discovers .proto files to do code generation for. .proto files of the app -// (everything under protoPath) will always be a part of the discovered files. -// -// when .proto files of the app depends on another proto package under includePaths (dependencies), those -// may need to be discovered as well. some protoc plugins already do this discovery internally but -// for the ones that don't, it needs to be handled here if GenerateDependencies() is enabled. -func discoverFiles(ctx context.Context, c configs, protoPath string, includePaths []string, cache *protoanalysis.Cache) ( - discovered []string, err error, -) { - packages, err := protoanalysis.Parse(ctx, cache, protoPath) - if err != nil { - return nil, err - } - - discovered = packages.Files().Paths() - - if !c.isGeneratedDepsEnabled { - return discovered, nil - } - - for _, file := range packages.Files() { - d, err := searchFile(file, protoPath, includePaths) - if err != nil { - return nil, err - } - discovered = append(discovered, d...) - } - - return discovered, nil -} - -func searchFile(file protoanalysis.File, protoPath string, includePaths []string) (discovered []string, err error) { - dir := filepath.Dir(file.Path) - - for _, dep := range file.Dependencies { - // try to locate imported .proto file relative to the this .proto file. - guessedPath := filepath.Join(dir, dep) - _, err := os.Stat(guessedPath) - if err == nil { - discovered = append(discovered, guessedPath) - continue - } - if !os.IsNotExist(err) { - return nil, err - } - - // otherwise, search by absolute path in includePaths. - var found bool - for _, included := range includePaths { - guessedPath := filepath.Join(included, dep) - _, err := os.Stat(guessedPath) - if err == nil { - // found the dependency. - // if it's under protoPath, it is already discovered so, skip it. - if !strings.HasPrefix(guessedPath, protoPath) { - discovered = append(discovered, guessedPath) - - // perform a complete search on this one to discover its dependencies as well. - depFile, err := protoanalysis.ParseFile(guessedPath) - if err != nil { - return nil, err - } - d, err := searchFile(depFile, protoPath, includePaths) - if err != nil { - return nil, err - } - discovered = append(discovered, d...) - } - - found = true - break - } - if !os.IsNotExist(err) { - return nil, err - } - } - - if !found { - return nil, errors.Errorf("cannot locate dependency %q for %q", dep, file.Path) - } - } - - return discovered, nil -} diff --git a/ignite/pkg/repoversion/repoversion.go b/ignite/pkg/repoversion/repoversion.go index 4428a5d41b..f2f3e560ec 100644 --- a/ignite/pkg/repoversion/repoversion.go +++ b/ignite/pkg/repoversion/repoversion.go @@ -50,7 +50,6 @@ func Determine(path string) (v Version, err error) { return nil }) - if err != nil { return Version{}, err } @@ -94,7 +93,6 @@ func Determine(path string) (v Version, err error) { return nil }) - if err != nil { return Version{}, err } diff --git a/ignite/templates/app/files/proto/buf.gen.sta.yaml b/ignite/templates/app/files/proto/buf.gen.sta.yaml deleted file mode 100644 index 4444f5e75c..0000000000 --- a/ignite/templates/app/files/proto/buf.gen.sta.yaml +++ /dev/null @@ -1,15 +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.sta.yaml -# -version: v1 -plugins: - - name: openapiv2 - out: . - opt: - - logtostderr=true - - openapi_naming_strategy=simple - - ignore_comments=true - - simple_operation_ids=false - - json_names_for_fields=false From b9eef1f31481700a7a151d390cc053e231fb14a9 Mon Sep 17 00:00:00 2001 From: Pantani Date: Sat, 20 Apr 2024 02:16:26 +0200 Subject: [PATCH 02/14] add changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 4bdfddd697..90ed12c506 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,7 @@ - [#4004](https://github.com/ignite/cli/pull/4004) Remove all import placeholders using the `xast` pkg - [#3718](https://github.com/ignite/cli/pull/3718) Add `gen-mig-diffs` tool app to compare scaffold output of two versions of ignite - [#4077](https://github.com/ignite/cli/pull/4077) Merge the swagger files manually instead use nodetime `swagger-combine` +- [#4090](https://github.com/ignite/cli/pull/4090) Remove `protoc` pkg and also nodetime helpers `ts-proto` and `sta` ### Changes From d1f11639584b6d65ca5344bb288bc0c821444121 Mon Sep 17 00:00:00 2001 From: Pantani Date: Sat, 20 Apr 2024 02:58:54 +0200 Subject: [PATCH 03/14] run go mod tidy --- go.mod | 1 - go.sum | 2 -- 2 files changed, 3 deletions(-) diff --git a/go.mod b/go.mod index 6cbebe2954..c0bb40c6c0 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,6 @@ require ( github.com/hashicorp/go-plugin v1.6.0 github.com/iancoleman/strcase v0.3.0 github.com/ignite/ignite-files/nodetime v0.0.4 - github.com/ignite/ignite-files/protoc v0.0.1 github.com/ignite/web v0.6.1 github.com/imdario/mergo v0.3.13 github.com/jpillora/chisel v1.9.1 diff --git a/go.sum b/go.sum index 206b9bb335..e2f6f3adcf 100644 --- a/go.sum +++ b/go.sum @@ -911,8 +911,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/ignite/ignite-files/nodetime v0.0.4 h1:4mA/lZTAWczsNBHZ543VSxpK+P6BAU0HsLglxUtRrMU= github.com/ignite/ignite-files/nodetime v0.0.4/go.mod h1:GKDsXdeazHyhSBPdVLp7mNIo/m9LmZ6/h8RmQ0/CoaM= -github.com/ignite/ignite-files/protoc v0.0.1 h1:wXxU1dzruUgSVl1diAuAOA+xv0NQKXJFsDWht2+tAP8= -github.com/ignite/ignite-files/protoc v0.0.1/go.mod h1:cVCHJbEHPIeKHMPk3ZoPS0Xw4XQfUc76BAMAPU9Fwjg= github.com/ignite/web v0.6.1 h1:kHG+T7NnR8cCPjAGxEFQD+njVYM08toeG57iYRXzpwo= github.com/ignite/web v0.6.1/go.mod h1:WZWBaBYF8RazN7dE462BLpvXDY8ScacxcJ07BKwX/jY= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= From dbd923595a33399cffc273280995b492242982e3 Mon Sep 17 00:00:00 2001 From: Pantani Date: Fri, 26 Apr 2024 21:18:17 +0200 Subject: [PATCH 04/14] remove unused proto folder handling --- ignite/pkg/cosmosbuf/buf.go | 43 ------------------------------------- 1 file changed, 43 deletions(-) diff --git a/ignite/pkg/cosmosbuf/buf.go b/ignite/pkg/cosmosbuf/buf.go index 5dcd1ea94e..8e30379b95 100644 --- a/ignite/pkg/cosmosbuf/buf.go +++ b/ignite/pkg/cosmosbuf/buf.go @@ -10,7 +10,6 @@ import ( "golang.org/x/sync/errgroup" "github.com/ignite/cli/v29/ignite/pkg/cmdrunner/exec" - "github.com/ignite/cli/v29/ignite/pkg/cosmosver" "github.com/ignite/cli/v29/ignite/pkg/errors" "github.com/ignite/cli/v29/ignite/pkg/protoanalysis" "github.com/ignite/cli/v29/ignite/pkg/xexec" @@ -134,32 +133,6 @@ func (b Buf) Update(ctx context.Context, modDir string, dependencies ...string) // Export runs the buf Export command for the files in the proto directory. func (b Buf) Export(ctx context.Context, protoDir, output string) error { - // Check if the proto directory is the Cosmos SDK one - // TODO(@julienrbrt): this whole custom handling can be deleted - // after https://github.com/cosmos/cosmos-sdk/pull/18993 in v29. - if strings.Contains(protoDir, cosmosver.CosmosSDKRepoName) { - if b.sdkProtoDir == "" { - // Copy Cosmos SDK proto path without the Buf workspace. - // This is done because the workspace contains a reference to - // a "orm/internal" proto folder that is not present by default - // in the SDK repository. - d, err := copySDKProtoDir(protoDir) - if err != nil { - return err - } - - b.sdkProtoDir = d - } - - // Split absolute path into an absolute prefix and a relative suffix - paths := strings.Split(protoDir, "/proto") - if len(paths) < 2 { - return errors.Errorf("invalid Cosmos SDK mod path: %s", protoDir) - } - - // Use the SDK copy to resolve SDK proto files - protoDir = filepath.Join(b.sdkProtoDir, paths[1]) - } specs, err := xos.FindFiles(protoDir, xos.ProtoFile) if err != nil { return err @@ -201,22 +174,6 @@ func (b Buf) Generate( excluded[file] = struct{}{} } - // TODO(@julienrbrt): this whole custom handling can be deleted - // after https://github.com/cosmos/cosmos-sdk/pull/18993 in v29. - if strings.Contains(protoDir, cosmosver.CosmosSDKRepoName) { - if b.sdkProtoDir == "" { - b.sdkProtoDir, err = copySDKProtoDir(protoDir) - if err != nil { - return err - } - } - dirs := strings.Split(protoDir, "/proto/") - if len(dirs) < 2 { - return errors.Errorf("invalid Cosmos SDK mod path: %s", dirs) - } - protoDir = filepath.Join(b.sdkProtoDir, dirs[1]) - } - pkgs, err := protoanalysis.Parse(ctx, b.cache, protoDir) if err != nil { return err From fb43bf5d0f6f66dafa4806c5aaf784f327dd06f1 Mon Sep 17 00:00:00 2001 From: Pantani Date: Fri, 26 Apr 2024 21:22:46 +0200 Subject: [PATCH 05/14] add ts-client tests --- integration/chain/cmd_serve_test.go | 30 ------------------------- integration/cosmosgen/cosmosgen_test.go | 18 +++++---------- 2 files changed, 5 insertions(+), 43 deletions(-) diff --git a/integration/chain/cmd_serve_test.go b/integration/chain/cmd_serve_test.go index 422fcc59f7..dd14f506fe 100644 --- a/integration/chain/cmd_serve_test.go +++ b/integration/chain/cmd_serve_test.go @@ -9,40 +9,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/ignite/cli/v29/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/v29/ignite/pkg/xos" envtest "github.com/ignite/cli/v29/integration" ) -func TestServeWithWasm(t *testing.T) { - t.Skip() - - var ( - env = envtest.New(t) - app = env.Scaffold("github.com/test/sgblog") - servers = app.RandomizeServerPorts() - ) - - env.Must(env.Exec("add Wasm module", - step.NewSteps(step.New( - step.Exec(envtest.IgniteApp, "s", "wasm", "--yes"), - step.Workdir(app.SourcePath()), - )), - )) - - var ( - ctx, cancel = context.WithTimeout(env.Ctx(), envtest.ServeTimeout) - isBackendAliveErr error - ) - go func() { - defer cancel() - isBackendAliveErr = env.IsAppServed(ctx, servers.API) - }() - env.Must(app.Serve("should serve", envtest.ExecCtx(ctx))) - - require.NoError(t, isBackendAliveErr, "app cannot get online in time") -} - func TestServeWithCustomHome(t *testing.T) { var ( env = envtest.New(t) diff --git a/integration/cosmosgen/cosmosgen_test.go b/integration/cosmosgen/cosmosgen_test.go index ddf1452bf2..3427a0987e 100644 --- a/integration/cosmosgen/cosmosgen_test.go +++ b/integration/cosmosgen/cosmosgen_test.go @@ -13,8 +13,6 @@ import ( ) func TestCosmosGenScaffold(t *testing.T) { - t.Skip() - var ( env = envtest.New(t) app = env.Scaffold("github.com/test/blog") @@ -100,11 +98,7 @@ func TestCosmosGenScaffold(t *testing.T) { )), )) - var ( - vueDirGenerated = filepath.Join(app.SourcePath(), "vue/src/store/generated") - tsDirGenerated = filepath.Join(app.SourcePath(), "ts-client") - ) - require.NoError(t, os.RemoveAll(vueDirGenerated)) + tsDirGenerated := filepath.Join(app.SourcePath(), "ts-client") require.NoError(t, os.RemoveAll(tsDirGenerated)) env.Must(env.Exec("generate vue and typescript", @@ -112,7 +106,7 @@ func TestCosmosGenScaffold(t *testing.T) { step.Exec( envtest.IgniteApp, "g", - "vuex", + "ts-client", "--yes", "--clear-cache", ), @@ -147,11 +141,9 @@ func TestCosmosGenScaffold(t *testing.T) { } for _, mod := range expectedModules { - for _, dir := range []string{vueDirGenerated, tsDirGenerated} { - _, err := os.Stat(filepath.Join(dir, mod)) - if assert.False(t, os.IsNotExist(err), "missing module %q in %s", mod, dir) { - assert.NoError(t, err) - } + _, err := os.Stat(filepath.Join(tsDirGenerated, mod)) + if assert.False(t, os.IsNotExist(err), "missing module %q in %s", mod, tsDirGenerated) { + assert.NoError(t, err) } } } From 0e94d18090d26af85d4dc4b626f321be49e9acb4 Mon Sep 17 00:00:00 2001 From: Pantani Date: Wed, 15 May 2024 01:37:29 +0200 Subject: [PATCH 06/14] remove unused methods --- ignite/pkg/cosmosbuf/buf.go | 22 --------------- ignite/pkg/cosmosbuf/buf_test.go | 48 -------------------------------- 2 files changed, 70 deletions(-) delete mode 100644 ignite/pkg/cosmosbuf/buf_test.go diff --git a/ignite/pkg/cosmosbuf/buf.go b/ignite/pkg/cosmosbuf/buf.go index 8e30379b95..7a912ebe94 100644 --- a/ignite/pkg/cosmosbuf/buf.go +++ b/ignite/pkg/cosmosbuf/buf.go @@ -247,25 +247,3 @@ func (b Buf) generateCommand( } return command, nil } - -// findSDKProtoPath finds the Cosmos SDK proto folder path. -func findSDKProtoPath(protoDir string) string { - paths := strings.Split(protoDir, "@") - if len(paths) < 2 { - return protoDir - } - version := strings.Split(paths[1], "/")[0] - return fmt.Sprintf("%s@%s/proto", paths[0], version) -} - -// copySDKProtoDir copies the Cosmos SDK proto folder to a temporary directory. -// The temporary directory must be removed by the caller. -func copySDKProtoDir(protoDir string) (string, error) { - tmpDir, err := os.MkdirTemp("", "proto-sdk") - if err != nil { - return "", err - } - - srcPath := findSDKProtoPath(protoDir) - return tmpDir, xos.CopyFolder(srcPath, tmpDir) -} diff --git a/ignite/pkg/cosmosbuf/buf_test.go b/ignite/pkg/cosmosbuf/buf_test.go deleted file mode 100644 index 68187bf165..0000000000 --- a/ignite/pkg/cosmosbuf/buf_test.go +++ /dev/null @@ -1,48 +0,0 @@ -package cosmosbuf - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestFindSDKPath(t *testing.T) { - testCases := []struct { - name string - protoDir string - want string - }{ - { - name: "full path", - protoDir: "/mod/github.com/cosmos/cosmos-sdk@v0.47.2/test/path/proto", - want: "/mod/github.com/cosmos/cosmos-sdk@v0.47.2/proto", - }, - { - name: "simple path", - protoDir: "myproto@v1/test/proto/animo/sdk", - want: "myproto@v1/proto", - }, - { - name: "only version", - protoDir: "test/myproto@v1", - want: "test/myproto@v1/proto", - }, - { - name: "semantic version", - protoDir: "test/myproto@v0.3.1/test/proto", - want: "test/myproto@v0.3.1/proto", - }, - { - name: "no version (local)", - protoDir: "test/myproto/test/proto", - want: "test/myproto/test/proto", - }, - } - - for _, tt := range testCases { - t.Run(tt.name, func(t *testing.T) { - got := findSDKProtoPath(tt.protoDir) - require.Equal(t, tt.want, got) - }) - } -} From c3d8ac09bac56db9c33f4250510ec8eca924b486 Mon Sep 17 00:00:00 2001 From: Pantani Date: Wed, 22 May 2024 00:45:45 +0200 Subject: [PATCH 07/14] use import includes instead manual --- .../plugin/testdata/execute_fail/go.mod | 4 +- .../plugin/testdata/execute_ok/go.mod | 4 +- ignite/pkg/cosmosbuf/buf.go | 108 +++++++++--------- ignite/pkg/cosmosgen/generate_openapi.go | 48 -------- ignite/pkg/cosmosgen/generate_typescript.go | 12 +- .../plugin/testdata/example-plugin/go.mod | 4 +- 6 files changed, 64 insertions(+), 116 deletions(-) diff --git a/ignite/internal/plugin/testdata/execute_fail/go.mod b/ignite/internal/plugin/testdata/execute_fail/go.mod index 1488336a18..6aa02db449 100644 --- a/ignite/internal/plugin/testdata/execute_fail/go.mod +++ b/ignite/internal/plugin/testdata/execute_fail/go.mod @@ -1,8 +1,8 @@ module execute_fail -go 1.21.1 +go 1.22 -toolchain go1.21.5 +toolchain go1.22.3 require ( github.com/hashicorp/go-plugin v1.6.0 diff --git a/ignite/internal/plugin/testdata/execute_ok/go.mod b/ignite/internal/plugin/testdata/execute_ok/go.mod index 484f6a45cb..6f8e0c2ac3 100644 --- a/ignite/internal/plugin/testdata/execute_ok/go.mod +++ b/ignite/internal/plugin/testdata/execute_ok/go.mod @@ -1,8 +1,8 @@ module execute_ok -go 1.21.1 +go 1.22 -toolchain go1.21.5 +toolchain go1.22.3 require ( github.com/hashicorp/go-plugin v1.6.0 diff --git a/ignite/pkg/cosmosbuf/buf.go b/ignite/pkg/cosmosbuf/buf.go index 136a12e56d..c3cc299f4a 100644 --- a/ignite/pkg/cosmosbuf/buf.go +++ b/ignite/pkg/cosmosbuf/buf.go @@ -17,6 +17,40 @@ import ( "github.com/ignite/cli/v29/ignite/pkg/xos" ) +const ( + binaryName = "buf" + flagTemplate = "template" + flagOutput = "output" + flagErrorFormat = "error-format" + flagLogFormat = "log-format" + flagIncludeImports = "include-imports" + flagIncludeWellKnownTypes = "include-wkt" + flagPath = "path" + flagOnly = "only" + fmtJSON = "json" + + // CMDGenerate generate command. + CMDGenerate Command = "generate" + CMDExport Command = "export" + CMDMod Command = "mod" + + specCacheNamespace = "generate.buf" +) + +var ( + commands = map[Command]struct{}{ + CMDGenerate: {}, + CMDExport: {}, + CMDMod: {}, + } + + // ErrInvalidCommand indicates an invalid command name. + ErrInvalidCommand = errors.New("invalid command name") + + // ErrProtoFilesNotFound indicates that no ".proto" files were found. + ErrProtoFilesNotFound = errors.New("no proto files found") +) + type ( // Command represents a high level command under buf. Command string @@ -29,69 +63,30 @@ type ( // genOptions used to configure code generation. genOptions struct { - excluded []glob.Glob - fileByFile bool - flags map[string]string - includeImports []string + excluded []glob.Glob + fileByFile bool + flags map[string]string } // GenOption configures code generation. GenOption func(*genOptions) ) -func newGenOptions() *genOptions { - return &genOptions{ - flags: make(map[string]string), - includeImports: make([]string, 0), +func newGenOptions() genOptions { + return genOptions{ + flags: make(map[string]string), + excluded: make([]glob.Glob, 0), + fileByFile: false, } } -// WithGenerateFlag provides flag options for the buf generate command. -func WithGenerateFlag(flag, value string) GenOption { +// WithFlag provides flag options for the buf generate command. +func WithFlag(flag, value string) GenOption { return func(o *genOptions) { o.flags[flag] = value } } -// IncludeImports include proto import. -func IncludeImports(includeImports ...string) GenOption { - return func(o *genOptions) { - o.includeImports = append(o.includeImports, includeImports...) - } -} - -const ( - binaryName = "buf" - flagTemplate = "template" - flagOutput = "output" - flagErrorFormat = "error-format" - flagLogFormat = "log-format" - flagPath = "path" - flagOnly = "only" - fmtJSON = "json" - - // CMDGenerate generate command. - CMDGenerate Command = "generate" - CMDExport Command = "export" - CMDMod Command = "mod" - - specCacheNamespace = "generate.buf" -) - -var ( - commands = map[Command]struct{}{ - CMDGenerate: {}, - CMDExport: {}, - CMDMod: {}, - } - - // ErrInvalidCommand indicates an invalid command name. - ErrInvalidCommand = errors.New("invalid command name") - - // ErrProtoFilesNotFound indicates that no ".proto" files were found. - ErrProtoFilesNotFound = errors.New("no proto files found") -) - // ExcludeFiles exclude file names from the generate command using glob. func ExcludeFiles(patterns ...string) GenOption { return func(o *genOptions) { @@ -179,7 +174,7 @@ func (b Buf) Generate( template string, options ...GenOption, ) (err error) { - opts := genOptions{} + opts := newGenOptions() for _, apply := range options { apply(&opts) } @@ -217,10 +212,15 @@ func (b Buf) Generate( } flags := map[string]string{ - flagTemplate: template, - flagOutput: output, - flagErrorFormat: fmtJSON, - flagLogFormat: fmtJSON, + flagTemplate: template, + flagOutput: output, + flagErrorFormat: fmtJSON, + flagLogFormat: fmtJSON, + flagIncludeImports: "true", + flagIncludeWellKnownTypes: "true", + } + for k, v := range opts.flags { + flags[k] = v } if !opts.fileByFile { diff --git a/ignite/pkg/cosmosgen/generate_openapi.go b/ignite/pkg/cosmosgen/generate_openapi.go index 28bf99a0a9..7e40704d60 100644 --- a/ignite/pkg/cosmosgen/generate_openapi.go +++ b/ignite/pkg/cosmosgen/generate_openapi.go @@ -11,7 +11,6 @@ import ( "github.com/iancoleman/strcase" "github.com/ignite/cli/v29/ignite/pkg/cache" - "github.com/ignite/cli/v29/ignite/pkg/cosmosanalysis/module" "github.com/ignite/cli/v29/ignite/pkg/cosmosbuf" "github.com/ignite/cli/v29/ignite/pkg/dirchange" "github.com/ignite/cli/v29/ignite/pkg/errors" @@ -28,10 +27,6 @@ func (g *generator) openAPITemplate() string { return filepath.Join(g.appPath, g.protoDir, "buf.gen.swagger.yaml") } -func (g *generator) openAPITemplateForSTA() string { - return filepath.Join(g.appPath, g.protoDir, "buf.gen.sta.yaml") -} - func (g *generator) generateOpenAPISpec(ctx context.Context) error { var ( specDirs []string @@ -170,49 +165,6 @@ func (g *generator) generateOpenAPISpec(ctx context.Context) error { return dirchange.SaveDirChecksum(specCache, out, g.appPath, out) } -// generateModuleOpenAPISpec generates a spec for a module where it's source code resides at src. -// and adds needed swaggercombine configure for it. -func (g *generator) generateModuleOpenAPISpec(ctx context.Context, m module.Module, out string) error { - var ( - specDirs []string - title = "HTTP API Console " + m.Pkg.Name - conf = swaggercombine.New(title, g.goModPath) - ) - defer func() { - for _, dir := range specDirs { - os.RemoveAll(dir) - } - }() - - // generate specs for each module and persist them in the file system - // after add their path and config to swaggercombine.Config so we can combine them - // into a single spec. - dir, err := os.MkdirTemp("", "gen-openapi-module-spec") - if err != nil { - return err - } - - err = g.buf.Generate(ctx, m.Pkg.Path, dir, g.openAPITemplateForSTA(), cosmosbuf.ExcludeFiles("*/module.proto")) - if err != nil { - return err - } - - specs, err := xos.FindFilesExtension(dir, xos.JSONFile) - if err != nil { - return err - } - - for _, spec := range specs { - if err := conf.AddSpec(strcase.ToCamel(m.Pkg.Name), spec, false); err != nil { - return err - } - } - specDirs = append(specDirs, dir) - - // combine specs into one and save to out. - return conf.Combine(out) -} - func extractRootModulePath(fullPath string) string { var ( segments = strings.Split(fullPath, "/") diff --git a/ignite/pkg/cosmosgen/generate_typescript.go b/ignite/pkg/cosmosgen/generate_typescript.go index 54492f393b..bed25f2f0e 100644 --- a/ignite/pkg/cosmosgen/generate_typescript.go +++ b/ignite/pkg/cosmosgen/generate_typescript.go @@ -79,7 +79,7 @@ func (g *generator) generateTS(ctx context.Context) error { func (g *tsGenerator) generateModuleTemplates(ctx context.Context) error { gg := &errgroup.Group{} dirCache := cache.New[[]byte](g.g.cacheStorage, dirchangeCacheNamespace) - add := func(sourcePath string, modules []module.Module, includes []string) { + add := func(sourcePath string, modules []module.Module) { for _, m := range modules { m := m @@ -101,7 +101,7 @@ func (g *tsGenerator) generateModuleTemplates(ctx context.Context) error { } } - if err := g.generateModuleTemplate(ctx, sourcePath, m, includes); err != nil { + if err := g.generateModuleTemplate(ctx, sourcePath, m); err != nil { return err } @@ -110,7 +110,7 @@ func (g *tsGenerator) generateModuleTemplates(ctx context.Context) error { } } - add(g.g.appPath, g.g.appModules, g.g.appIncludes.Paths) + add(g.g.appPath, g.g.appModules) // Always generate third party modules; This is required because not generating them might // lead to issues with the module registration in the root template. The root template must @@ -118,9 +118,7 @@ func (g *tsGenerator) generateModuleTemplates(ctx context.Context) error { // is available and not generated it would lead to the registration of a new not generated // 3rd party module. for sourcePath, modules := range g.g.thirdModules { - // TODO: Skip modules without proto files? - thirdIncludes := g.g.thirdModuleIncludes[sourcePath] - add(sourcePath, modules, append(g.g.appIncludes.Paths, thirdIncludes.Paths...)) + add(sourcePath, modules) } return gg.Wait() @@ -130,7 +128,6 @@ func (g *tsGenerator) generateModuleTemplate( ctx context.Context, appPath string, m module.Module, - includePaths []string, ) error { var ( out = g.g.opts.jsOut(m) @@ -157,7 +154,6 @@ func (g *tsGenerator) generateModuleTemplate( typesOut, g.g.tsTemplate(), cosmosbuf.ExcludeFiles("module.proto"), - cosmosbuf.IncludeImports(includePaths...), ); err != nil { return err } diff --git a/integration/plugin/testdata/example-plugin/go.mod b/integration/plugin/testdata/example-plugin/go.mod index fa81cbccaf..c94900f976 100644 --- a/integration/plugin/testdata/example-plugin/go.mod +++ b/integration/plugin/testdata/example-plugin/go.mod @@ -1,8 +1,8 @@ module example-plugin -go 1.21.1 +go 1.22 -toolchain go1.21.4 +toolchain go1.22.3 require ( github.com/hashicorp/go-plugin v1.6.0 From ec78d8978ff2fbf5bf0f1810539b48783d12531f Mon Sep 17 00:00:00 2001 From: Pantani Date: Wed, 22 May 2024 01:02:26 +0200 Subject: [PATCH 08/14] use buf dep instead buf mod --- ignite/pkg/cosmosbuf/buf.go | 20 +++++--------------- ignite/pkg/cosmosgen/generate.go | 2 +- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/ignite/pkg/cosmosbuf/buf.go b/ignite/pkg/cosmosbuf/buf.go index c3cc299f4a..91e2221a73 100644 --- a/ignite/pkg/cosmosbuf/buf.go +++ b/ignite/pkg/cosmosbuf/buf.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "path/filepath" - "strings" "github.com/gobwas/glob" "golang.org/x/sync/errgroup" @@ -26,13 +25,12 @@ const ( flagIncludeImports = "include-imports" flagIncludeWellKnownTypes = "include-wkt" flagPath = "path" - flagOnly = "only" fmtJSON = "json" // CMDGenerate generate command. CMDGenerate Command = "generate" CMDExport Command = "export" - CMDMod Command = "mod" + CMDDep Command = "dep" specCacheNamespace = "generate.buf" ) @@ -41,7 +39,7 @@ var ( commands = map[Command]struct{}{ CMDGenerate: {}, CMDExport: {}, - CMDMod: {}, + CMDDep: {}, } // ErrInvalidCommand indicates an invalid command name. @@ -127,17 +125,9 @@ func (c Command) String() string { return string(c) } -// Update updates module dependencies. -// By default updates all dependencies unless one or more dependencies are specified. -func (b Buf) Update(ctx context.Context, modDir string, dependencies ...string) error { - var flags map[string]string - if dependencies != nil { - flags = map[string]string{ - flagOnly: strings.Join(dependencies, ","), - } - } - - cmd, err := b.command(CMDMod, flags, "update", modDir) +// Update updates module dependencies. By default updates all dependencies. +func (b Buf) Update(ctx context.Context, modDir string) error { + cmd, err := b.command(CMDDep, nil, "update", modDir) if err != nil { return err } diff --git a/ignite/pkg/cosmosgen/generate.go b/ignite/pkg/cosmosgen/generate.go index fa4bfc7344..cb96d3ba6c 100644 --- a/ignite/pkg/cosmosgen/generate.go +++ b/ignite/pkg/cosmosgen/generate.go @@ -410,7 +410,7 @@ func (g generator) addBufDependency(ctx context.Context, depName string) error { ) // Update Buf lock so it contains the new dependency - return g.buf.Update(ctx, filepath.Dir(path), depName) + return g.buf.Update(ctx, filepath.Dir(path)) } func (g generator) vendorProtoPackage(pkgName, protoPath string) (err error) { From aa62b83f9d28fdb786cb9ecb564d74737e57fa0c Mon Sep 17 00:00:00 2001 From: Pantani Date: Wed, 22 May 2024 12:24:36 +0200 Subject: [PATCH 09/14] change buf mod update to comand to buf dep update --- ignite/pkg/cosmosbuf/buf.go | 51 ++++++++++++++----- ignite/pkg/cosmosgen/generate.go | 13 ++--- ignite/pkg/cosmosgen/generate_go.go | 8 ++- ignite/pkg/cosmosgen/generate_typescript.go | 1 + .../templates/app/files/{{protoDir}}/buf.lock | 6 +++ integration/cosmosgen/cosmosgen_test.go | 8 +-- 6 files changed, 63 insertions(+), 24 deletions(-) diff --git a/ignite/pkg/cosmosbuf/buf.go b/ignite/pkg/cosmosbuf/buf.go index 91e2221a73..7cca72ad60 100644 --- a/ignite/pkg/cosmosbuf/buf.go +++ b/ignite/pkg/cosmosbuf/buf.go @@ -61,9 +61,11 @@ type ( // genOptions used to configure code generation. genOptions struct { - excluded []glob.Glob - fileByFile bool - flags map[string]string + excluded []glob.Glob + flags map[string]string + fileByFile bool + includeImports bool + includeWKT bool } // GenOption configures code generation. @@ -72,9 +74,11 @@ type ( func newGenOptions() genOptions { return genOptions{ - flags: make(map[string]string), - excluded: make([]glob.Glob, 0), - fileByFile: false, + flags: make(map[string]string), + excluded: make([]glob.Glob, 0), + fileByFile: false, + includeWKT: false, + includeImports: false, } } @@ -94,6 +98,22 @@ func ExcludeFiles(patterns ...string) GenOption { } } +// IncludeImports also generate all imports except for Well-Known Types. +func IncludeImports() GenOption { + return func(o *genOptions) { + o.includeImports = true + } +} + +// IncludeWKT also generate Well-Known Types. +// Cannot be set without IncludeImports. +func IncludeWKT() GenOption { + return func(o *genOptions) { + o.includeImports = true + o.includeWKT = true + } +} + // FileByFile runs the generate command for each proto file. func FileByFile() GenOption { return func(o *genOptions) { @@ -125,7 +145,8 @@ func (c Command) String() string { return string(c) } -// Update updates module dependencies. By default updates all dependencies. +// Update updates module dependencies. +// By default updates all dependencies unless one or more dependencies are specified. func (b Buf) Update(ctx context.Context, modDir string) error { cmd, err := b.command(CMDDep, nil, "update", modDir) if err != nil { @@ -202,16 +223,20 @@ func (b Buf) Generate( } flags := map[string]string{ - flagTemplate: template, - flagOutput: output, - flagErrorFormat: fmtJSON, - flagLogFormat: fmtJSON, - flagIncludeImports: "true", - flagIncludeWellKnownTypes: "true", + flagTemplate: template, + flagOutput: output, + flagErrorFormat: fmtJSON, + flagLogFormat: fmtJSON, } for k, v := range opts.flags { flags[k] = v } + if opts.includeImports { + flags[flagIncludeImports] = "true" + } + if opts.includeWKT { + flags[flagIncludeWellKnownTypes] = "true" + } if !opts.fileByFile { cmd, err := b.command(CMDGenerate, flags, protoPath) diff --git a/ignite/pkg/cosmosgen/generate.go b/ignite/pkg/cosmosgen/generate.go index cb96d3ba6c..544edfd120 100644 --- a/ignite/pkg/cosmosgen/generate.go +++ b/ignite/pkg/cosmosgen/generate.go @@ -326,7 +326,7 @@ func (g generator) updateBufModule(ctx context.Context) error { // When a Buf config with name is available add it to app's dependencies // or otherwise export the proto files to a vendor directory. if includes.BufPath != "" { - if err := g.resolveBufDependency(ctx, pkgName, includes.BufPath); err != nil { + if err := g.resolveBufDependency(pkgName, includes.BufPath); err != nil { return err } } else { @@ -335,10 +335,11 @@ func (g generator) updateBufModule(ctx context.Context) error { } } } - return nil + path := g.appIncludes.BufPath + return g.buf.Update(ctx, filepath.Dir(path)) } -func (g generator) resolveBufDependency(ctx context.Context, pkgName, bufPath string) error { +func (g generator) resolveBufDependency(pkgName, bufPath string) error { // Open the dependency Buf config to find the BSR package name f, err := os.Open(bufPath) if err != nil { @@ -357,13 +358,13 @@ func (g generator) resolveBufDependency(ctx context.Context, pkgName, bufPath st // When dependency package has a Buf config name try to add it to app's // dependencies. Name is optional and defines the BSR package name. if cfg.Name != "" { - return g.addBufDependency(ctx, cfg.Name) + return g.addBufDependency(cfg.Name) } // By default just vendor the proto package return g.vendorProtoPackage(pkgName, filepath.Dir(bufPath)) } -func (g generator) addBufDependency(ctx context.Context, depName string) error { +func (g generator) addBufDependency(depName string) error { // Read app's Buf config path := g.appIncludes.BufPath bz, err := os.ReadFile(path) @@ -410,7 +411,7 @@ func (g generator) addBufDependency(ctx context.Context, depName string) error { ) // Update Buf lock so it contains the new dependency - return g.buf.Update(ctx, filepath.Dir(path)) + return nil } func (g generator) vendorProtoPackage(pkgName, protoPath string) (err error) { diff --git a/ignite/pkg/cosmosgen/generate_go.go b/ignite/pkg/cosmosgen/generate_go.go index 2aeb52f6c9..d661ff5c11 100644 --- a/ignite/pkg/cosmosgen/generate_go.go +++ b/ignite/pkg/cosmosgen/generate_go.go @@ -42,7 +42,13 @@ func (g *generator) generate(ctx context.Context, template, fromPath string, exc defer os.RemoveAll(tmp) // code generate for each module. - if err := g.buf.Generate(ctx, g.protoPath(), tmp, template, cosmosbuf.ExcludeFiles(excluded...)); err != nil { + if err := g.buf.Generate( + ctx, + g.protoPath(), + tmp, + template, + cosmosbuf.ExcludeFiles(excluded...), + ); err != nil { return err } diff --git a/ignite/pkg/cosmosgen/generate_typescript.go b/ignite/pkg/cosmosgen/generate_typescript.go index bed25f2f0e..8ed6893350 100644 --- a/ignite/pkg/cosmosgen/generate_typescript.go +++ b/ignite/pkg/cosmosgen/generate_typescript.go @@ -154,6 +154,7 @@ func (g *tsGenerator) generateModuleTemplate( typesOut, g.g.tsTemplate(), cosmosbuf.ExcludeFiles("module.proto"), + cosmosbuf.IncludeWKT(), ); err != nil { return err } diff --git a/ignite/templates/app/files/{{protoDir}}/buf.lock b/ignite/templates/app/files/{{protoDir}}/buf.lock index 0a6a9564ce..8441ef4d01 100644 --- a/ignite/templates/app/files/{{protoDir}}/buf.lock +++ b/ignite/templates/app/files/{{protoDir}}/buf.lock @@ -9,23 +9,29 @@ deps: owner: cosmos repository: cosmos-proto commit: 04467658e59e44bbb22fe568206e1f70 + digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 - remote: buf.build owner: cosmos repository: cosmos-sdk commit: 05419252bcc241ea8023acf1ed4cadc5 + digest: shake256:1e54a48c19a8b59d35e0a7efa76402939f515f2d8005df099856f24c37c20a52800308f025abb8cffcd014d437b49707388aaca4865d9d063d8f25d5d4eb77d5 - remote: buf.build owner: cosmos repository: gogo-proto commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba - remote: buf.build owner: cosmos repository: ics23 commit: a9ee7c290ef34ee69d3f141b9b44dcee + digest: shake256:255dbee3e92a370723bf4d72b34868b18e7570543f30f79c0c8c10a5a332d230175e0c29cb7ebcb8020706312e3cd37c23974df0bacfb60a4afb968fee4c1afc - remote: buf.build owner: googleapis repository: googleapis commit: 09703837a2ed48dbbbb3fdfbe6a84f5c + digest: shake256:de26a277fc28b8b411ecf58729d78d32fcf15090ffd998a4469225b17889bfb51442eaab04bb7a8d88d203ecdf0a9febd4ffd52c18ed1c2229160c7bd353ca95 - remote: buf.build owner: protocolbuffers repository: wellknowntypes commit: 3186086b2a8e44d9acdeeef2423c5de7 + digest: shake256:3b9dc2f56d9ed2e4001f95b701985fd803f7e2559b19b6a18d5f4e792cfdde320e765638de69fff037edc202b0006532d7ff19eab9465526b5ec628e4a5e5a1a diff --git a/integration/cosmosgen/cosmosgen_test.go b/integration/cosmosgen/cosmosgen_test.go index 3427a0987e..5f347130f1 100644 --- a/integration/cosmosgen/cosmosgen_test.go +++ b/integration/cosmosgen/cosmosgen_test.go @@ -101,7 +101,7 @@ func TestCosmosGenScaffold(t *testing.T) { tsDirGenerated := filepath.Join(app.SourcePath(), "ts-client") require.NoError(t, os.RemoveAll(tsDirGenerated)) - env.Must(env.Exec("generate vue and typescript", + env.Must(env.Exec("generate typescript", step.NewSteps(step.New( step.Exec( envtest.IgniteApp, @@ -135,9 +135,9 @@ func TestCosmosGenScaffold(t *testing.T) { "cosmos.upgrade.v1beta1", "cosmos.vesting.v1beta1", // custom modules - "test.blog.blog", - "test.blog.withmsg", - "test.blog.withoutmsg", + "blog.blog.v1", + "blog.withmsg.v1", + "blog.withoutmsg.v1", } for _, mod := range expectedModules { From ec9804e28037bb5650e53dcdc4f3f5336347887d Mon Sep 17 00:00:00 2001 From: Pantani Date: Wed, 22 May 2024 12:26:48 +0200 Subject: [PATCH 10/14] improve code readbility --- ignite/pkg/cosmosgen/generate.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ignite/pkg/cosmosgen/generate.go b/ignite/pkg/cosmosgen/generate.go index 544edfd120..5a1588a5a1 100644 --- a/ignite/pkg/cosmosgen/generate.go +++ b/ignite/pkg/cosmosgen/generate.go @@ -335,8 +335,7 @@ func (g generator) updateBufModule(ctx context.Context) error { } } } - path := g.appIncludes.BufPath - return g.buf.Update(ctx, filepath.Dir(path)) + return g.buf.Update(ctx, filepath.Dir(g.appIncludes.BufPath)) } func (g generator) resolveBufDependency(pkgName, bufPath string) error { From d8a9c42263d6814d13ccb85d48d0d2f30b976aa0 Mon Sep 17 00:00:00 2001 From: Pantani Date: Wed, 22 May 2024 15:49:27 +0200 Subject: [PATCH 11/14] bump buf.build --- go.mod | 51 ++++---- go.sum | 111 ++++++++++-------- .../plugin/testdata/execute_fail/go.mod | 20 ++-- .../plugin/testdata/execute_ok/go.mod | 20 ++-- ignite/internal/tools/gen-config-doc/go.mod | 8 +- ignite/internal/tools/gen-config-doc/go.sum | 4 + ignite/internal/tools/gen-mig-diffs/go.mod | 12 +- ignite/internal/tools/gen-mig-diffs/go.sum | 6 + .../plugin/testdata/example-plugin/go.mod | 20 ++-- 9 files changed, 136 insertions(+), 116 deletions(-) diff --git a/go.mod b/go.mod index 0950b5dea1..990bee2a69 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/DATA-DOG/go-sqlmock v1.5.2 github.com/blang/semver/v4 v4.0.0 github.com/briandowns/spinner v1.23.0 - github.com/bufbuild/buf v1.30.1 + github.com/bufbuild/buf v1.32.1 github.com/buger/jsonparser v1.1.1 github.com/cenkalti/backoff v2.2.1+incompatible github.com/charmbracelet/bubbles v0.7.6 @@ -64,7 +64,7 @@ require ( github.com/pelletier/go-toml v1.9.5 github.com/radovskyb/watcher v1.0.7 github.com/rogpeppe/go-internal v1.12.0 - github.com/rs/cors v1.10.1 + github.com/rs/cors v1.11.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 @@ -73,12 +73,12 @@ require ( go.etcd.io/bbolt v1.3.9 golang.org/x/mod v0.17.0 golang.org/x/sync v0.7.0 - golang.org/x/term v0.19.0 - golang.org/x/text v0.14.0 - golang.org/x/tools v0.20.0 + golang.org/x/term v0.20.0 + golang.org/x/text v0.15.0 + golang.org/x/tools v0.21.0 golang.org/x/vuln v1.0.4 - google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.33.0 + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v3 v3.0.1 mvdan.cc/gofumpt v0.6.0 sigs.k8s.io/yaml v1.4.0 @@ -87,8 +87,10 @@ require ( require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect - buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240221180331-f05a6f4403ce.1 // indirect - connectrpc.com/connect v1.16.0 // indirect + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240508200655-46a4cf4ba109.1 // indirect + buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.1-20240514010100-299bd9c9a0c4.1 // indirect + buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.1-20240514010100-299bd9c9a0c4.1 // indirect + connectrpc.com/connect v1.16.1 // indirect connectrpc.com/otelconnect v0.7.0 // indirect cosmossdk.io/api v0.7.4 // indirect cosmossdk.io/collections v0.4.0 // indirect @@ -140,15 +142,16 @@ require ( github.com/breml/errchkjson v0.3.6 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect - github.com/bufbuild/protocompile v0.9.0 // indirect - github.com/bufbuild/protovalidate-go v0.6.0 // indirect - github.com/bufbuild/protoyaml-go v0.1.8 // indirect + github.com/bufbuild/protocompile v0.13.1-0.20240510201809-752249dfc37f // indirect + github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee // indirect + github.com/bufbuild/protovalidate-go v0.6.2 // indirect + github.com/bufbuild/protoyaml-go v0.1.9 // indirect github.com/butuzov/ireturn v0.3.0 // indirect github.com/butuzov/mirror v1.1.0 // indirect github.com/calmh/randomart v1.1.0 // indirect github.com/catenacyber/perfsprint v0.7.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.2 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect @@ -194,9 +197,9 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/dlclark/regexp2 v1.2.0 // indirect - github.com/docker/cli v26.0.0+incompatible // indirect + github.com/docker/cli v26.1.2+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v26.0.2+incompatible // indirect + github.com/docker/docker v26.1.2+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.1 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -248,7 +251,7 @@ require ( github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect - github.com/gofrs/uuid/v5 v5.0.0 // indirect + github.com/gofrs/uuid/v5 v5.2.0 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.1.0 // indirect @@ -268,7 +271,7 @@ require ( github.com/google/go-containerregistry v0.19.1 // indirect github.com/google/go-dap v0.11.0 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/pprof v0.0.0-20240327155427-868f304927ed // indirect + github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gorilla/css v1.0.0 // indirect @@ -313,7 +316,7 @@ require ( github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kisielk/errcheck v1.7.0 // indirect github.com/kkHAIKE/contextcheck v1.1.5 // indirect - github.com/klauspost/compress v1.17.7 // indirect + github.com/klauspost/compress v1.17.8 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -461,15 +464,15 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.6.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index eeb9760deb..1849c9809c 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,13 @@ 4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= 4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= 4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240221180331-f05a6f4403ce.1 h1:0nWhrRcnkgw1kwJ7xibIO8bqfOA7pBzBjGCDBxIHch8= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240221180331-f05a6f4403ce.1/go.mod h1:Tgn5bgL220vkFOI0KPStlcClPeOJzAv4uT+V8JXGUnw= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240401165935-b983156c5e99.1/go.mod h1:XF+P8+RmfdufmIYpGUC+6bF7S+IlmHDEnCrO3OXaUAQ= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240508200655-46a4cf4ba109.1 h1:LEXWFH/xZ5oOWrC3oOtHbUyBdzRWMCPpAQmKC9v05mA= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240508200655-46a4cf4ba109.1/go.mod h1:XF+P8+RmfdufmIYpGUC+6bF7S+IlmHDEnCrO3OXaUAQ= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.1-20240514010100-299bd9c9a0c4.1 h1:6GN3XU5DaLjZb2vdle1za4TCwRHlEXMGSFCmHz4FM3w= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.1-20240514010100-299bd9c9a0c4.1/go.mod h1:3Vwq3HRCNOcnv99Ra+/8K5cntwO/Gw98cIjsjQVxf4E= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.1-20240514010100-299bd9c9a0c4.1 h1:zrXXp1IT3qukIKorguvnrw/JzxYttBrXzktUQGiQHqA= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.1-20240514010100-299bd9c9a0c4.1/go.mod h1:8ONhsyCTLQ9kBslWnMgPrXTcxzCkKlxZqN9ewUveui8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -37,8 +42,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -connectrpc.com/connect v1.16.0 h1:rdtfQjZ0OyFkWPTegBNcH7cwquGAN1WzyJy80oFNibg= -connectrpc.com/connect v1.16.0/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= +connectrpc.com/connect v1.16.1 h1:rOdrK/RTI/7TVnn3JsVxt3n028MlTRwmK5Q4heSpjis= +connectrpc.com/connect v1.16.1/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY= connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc= cosmossdk.io/api v0.7.4 h1:sPo8wKwCty1lht8kgL3J7YL1voJywP3YWuA5JKkBz30= @@ -205,14 +210,16 @@ github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipus github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/bufbuild/buf v1.30.1 h1:QFtanwsXodoGFAwzXFXGXpzBkb7N2u8ZDyA3jWB4Pbs= -github.com/bufbuild/buf v1.30.1/go.mod h1:7W8DJnj76wQa55EA3z2CmDxS0/nsHh8FqtE00dyDAdA= -github.com/bufbuild/protocompile v0.9.0 h1:DI8qLG5PEO0Mu1Oj51YFPqtx6I3qYXUAhJVJ/IzAVl0= -github.com/bufbuild/protocompile v0.9.0/go.mod h1:s89m1O8CqSYpyE/YaSGtg1r1YFMF5nLTwh4vlj6O444= -github.com/bufbuild/protovalidate-go v0.6.0 h1:Jgs1kFuZ2LHvvdj8SpCLA1W/+pXS8QSM3F/E2l3InPY= -github.com/bufbuild/protovalidate-go v0.6.0/go.mod h1:1LamgoYHZ2NdIQH0XGczGTc6Z8YrTHjcJVmiBaar4t4= -github.com/bufbuild/protoyaml-go v0.1.8 h1:X9QDLfl9uEllh4gsXUGqPanZYCOKzd92uniRtW2OnAQ= -github.com/bufbuild/protoyaml-go v0.1.8/go.mod h1:R8vE2+l49bSiIExP4VJpxOXleHE+FDzZ6HVxr3cYunw= +github.com/bufbuild/buf v1.32.1 h1:EsGUKtT1IFRAVS52v/OYcmvUAZ3o6hb6GoEOLM7WSlU= +github.com/bufbuild/buf v1.32.1/go.mod h1:trWT7vC+ujoZayhIVBOoU8JEOUVxWDFNs4+ixc5bLEA= +github.com/bufbuild/protocompile v0.13.1-0.20240510201809-752249dfc37f h1:cQLFPZXf32tbTLzUTg0n69Vi5kddhUiZMzpMzKRW0XU= +github.com/bufbuild/protocompile v0.13.1-0.20240510201809-752249dfc37f/go.mod h1:QJcgsTVPSBEMt+/3i2M/RpwjZc+DAXyPPDg0slmMk4c= +github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee h1:E6ET8YUcYJ1lAe6ctR3as7yqzW2BNItDFnaB5zQq/8M= +github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee/go.mod h1:HjGFxsck9RObrTJp2hXQZfWhPgZqnR6sR1U5fCA/Kus= +github.com/bufbuild/protovalidate-go v0.6.2 h1:U/V3CGF0kPlR12v41rjO4DrYZtLcS4ZONLmWN+rJVCQ= +github.com/bufbuild/protovalidate-go v0.6.2/go.mod h1:4BR3rKEJiUiTy+sqsusFn2ladOf0kYmA2Reo6BHSBgQ= +github.com/bufbuild/protoyaml-go v0.1.9 h1:anV5UtF1Mlvkkgp4NWA6U/zOnJFng8Orq4Vf3ZUQHBU= +github.com/bufbuild/protoyaml-go v0.1.9/go.mod h1:KCBItkvZOK/zwGueLdH1Wx1RLyFn5rCH7YjQrdty2Wc= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= @@ -230,8 +237,8 @@ github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQd github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -405,12 +412,12 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/docker/cli v26.0.0+incompatible h1:90BKrx1a1HKYpSnnBFR6AgDq/FqkHxwlUyzJVPxD30I= -github.com/docker/cli v26.0.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v26.1.2+incompatible h1:/MWZpUMMlr1hCGyquL8QNbL1hbivQ1kLuT3Z9s1Tlpg= +github.com/docker/cli v26.1.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v26.0.2+incompatible h1:yGVmKUFGgcxA6PXWAokO0sQL22BrQ67cgVjko8tGdXE= -github.com/docker/docker v26.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.2+incompatible h1:UVX5ZOrrfTGZZYEP+ZDq3Xn9PdHNXaSYMFPDumMqG2k= +github.com/docker/docker v26.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo= github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= @@ -624,8 +631,8 @@ github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14j github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M= -github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= +github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM= +github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -746,8 +753,8 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/google/pprof v0.0.0-20240327155427-868f304927ed h1:n8QtJTrwsv3P7dNxPaMeNkMcxvUpqocsHLr8iDLGlQI= -github.com/google/pprof v0.0.0-20240327155427-868f304927ed/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 h1:velgFPYr1X9TDwLIfkV7fWqsFlf7TeP11M/7kPd/dVI= +github.com/google/pprof v0.0.0-20240509144519-723abb6459b7/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -881,8 +888,8 @@ github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk= github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.15.6 h1:WMYJbw2Wo+KOWwZFvgY0jMoVHM6i4XIvRs2RcBj5VmI= -github.com/jhump/protoreflect v1.15.6/go.mod h1:jCHoyYQIJnaabEYnbGwyo9hUqfyUMTbJw/tAut5t97E= +github.com/jhump/protoreflect v1.16.0 h1:54fZg+49widqXYQ0b+usAFHbMkBGR4PpXrsHc8+TBDg= +github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= @@ -940,8 +947,8 @@ github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7 github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -1286,8 +1293,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= -github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= +github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -1533,8 +1540,8 @@ go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhs go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.starlark.net v0.0.0-20220816155156-cfacd8902214/go.mod h1:VZcBMdr3cT3PnBoWunTabuSEXwVAH+ZJ5zxfs3AdASk= go.starlark.net v0.0.0-20231101134539-556fd59b42f6 h1:+eC0F/k4aBLC4szgOcjd7bDTEnpxADJyWJE0yowgM3E= go.starlark.net v0.0.0-20231101134539-556fd59b42f6/go.mod h1:LcLNIzVOMp4oV+uusnpk+VU+SzXaJakUuBjoCSWH5dM= @@ -1581,8 +1588,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1594,8 +1601,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= @@ -1685,8 +1692,8 @@ golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1805,8 +1812,8 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1817,8 +1824,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1831,8 +1838,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1911,8 +1918,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/vuln v1.0.4 h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I= golang.org/x/vuln v1.0.4/go.mod h1:NbJdUQhX8jY++FtuhrXs2Eyx0yePo9pF7nPlIjo9aaQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1982,10 +1989,10 @@ google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa h1:Jt1XW5PaLXF1/ePZrznsh/aAUvI7Adfc3LY1dAKlzRs= -google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa/go.mod h1:K4kfzHtI0kqWA79gecJarFtDn/Mls+GxQcg3Zox91Ac= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 h1:4HZJ3Xv1cmrJ+0aFo304Zn79ur1HMxptAE7aCPNLSqc= +google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2008,8 +2015,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -2024,8 +2031,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/ignite/internal/plugin/testdata/execute_fail/go.mod b/ignite/internal/plugin/testdata/execute_fail/go.mod index 6aa02db449..8e9e736a5b 100644 --- a/ignite/internal/plugin/testdata/execute_fail/go.mod +++ b/ignite/internal/plugin/testdata/execute_fail/go.mod @@ -81,19 +81,19 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect go.etcd.io/bbolt v1.3.9 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.20.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.21.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/ignite/internal/plugin/testdata/execute_ok/go.mod b/ignite/internal/plugin/testdata/execute_ok/go.mod index 6f8e0c2ac3..492d50daa7 100644 --- a/ignite/internal/plugin/testdata/execute_ok/go.mod +++ b/ignite/internal/plugin/testdata/execute_ok/go.mod @@ -81,19 +81,19 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect go.etcd.io/bbolt v1.3.9 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.20.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.21.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/ignite/internal/tools/gen-config-doc/go.mod b/ignite/internal/tools/gen-config-doc/go.mod index 51ba62f286..a0a106bd03 100644 --- a/ignite/internal/tools/gen-config-doc/go.mod +++ b/ignite/internal/tools/gen-config-doc/go.mod @@ -61,10 +61,10 @@ require ( github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect github.com/spf13/pflag v1.0.5 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/ignite/internal/tools/gen-config-doc/go.sum b/ignite/internal/tools/gen-config-doc/go.sum index 7cb7487616..2f5b132693 100644 --- a/ignite/internal/tools/gen-config-doc/go.sum +++ b/ignite/internal/tools/gen-config-doc/go.sum @@ -195,6 +195,7 @@ golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -220,12 +221,14 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -233,6 +236,7 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= diff --git a/ignite/internal/tools/gen-mig-diffs/go.mod b/ignite/internal/tools/gen-mig-diffs/go.mod index 613bc863be..62587eac19 100644 --- a/ignite/internal/tools/gen-mig-diffs/go.mod +++ b/ignite/internal/tools/gen-mig-diffs/go.mod @@ -79,14 +79,14 @@ require ( github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - golang.org/x/crypto v0.22.0 // indirect + golang.org/x/crypto v0.23.0 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.20.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.21.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/ignite/internal/tools/gen-mig-diffs/go.sum b/ignite/internal/tools/gen-mig-diffs/go.sum index fc3c682d60..fe561c7fbf 100644 --- a/ignite/internal/tools/gen-mig-diffs/go.sum +++ b/ignite/internal/tools/gen-mig-diffs/go.sum @@ -226,6 +226,7 @@ golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2Uz golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -247,6 +248,7 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -278,6 +280,7 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -286,6 +289,7 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -295,6 +299,7 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -303,6 +308,7 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/integration/plugin/testdata/example-plugin/go.mod b/integration/plugin/testdata/example-plugin/go.mod index c94900f976..3033d77639 100644 --- a/integration/plugin/testdata/example-plugin/go.mod +++ b/integration/plugin/testdata/example-plugin/go.mod @@ -79,19 +79,19 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect go.etcd.io/bbolt v1.3.9 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.20.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.21.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) From 18aa025568f6afd6cd9e0399fef0379e21e30098 Mon Sep 17 00:00:00 2001 From: Pantani Date: Wed, 22 May 2024 16:12:54 +0200 Subject: [PATCH 12/14] bump buf into the go.mod --- .gitignore | 1 + .../app/testdata/modules/app_config/go.mod | 12 +- .../app/testdata/modules/runtime/go.mod | 14 +-- .../app/testdata/modules/single_app/go.mod | 14 +-- .../app/testdata/modules/spn/go.mod | 118 +++++++++--------- .../testdata/chain-sdk-local-fork/go.mod | 2 +- ignite/templates/app/files/go.mod.plush | 2 +- .../doctor/testdata/missing-tools.go.txt | 2 +- 8 files changed, 82 insertions(+), 83 deletions(-) diff --git a/.gitignore b/.gitignore index 671a36b808..6bf9befdb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ scripts/**/nodetime-* **/testdata/**/go.sum +**/testdata/go.sum dist/ node_modules .DS_Store diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/go.mod b/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/go.mod index c740bc6ccb..83de7de5b2 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/go.mod +++ b/ignite/pkg/cosmosanalysis/app/testdata/modules/app_config/go.mod @@ -8,23 +8,23 @@ require ( 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/bufbuild/buf v1.32.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/golang/protobuf v1.5.4 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/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 - google.golang.org/grpc v1.55.0 + google.golang.org/grpc v1.64.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.34.1 ) diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/runtime/go.mod b/ignite/pkg/cosmosanalysis/app/testdata/modules/runtime/go.mod index e480ea031f..52d44e6545 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/runtime/go.mod +++ b/ignite/pkg/cosmosanalysis/app/testdata/modules/runtime/go.mod @@ -8,29 +8,29 @@ require ( 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/bufbuild/buf v1.32.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/golang/protobuf v1.5.4 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/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 - google.golang.org/grpc v1.55.0 + google.golang.org/grpc v1.64.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.34.1 ) replace ( - // use cosmos fork of keyring + // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // replace broken goleveldb github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/single_app/go.mod b/ignite/pkg/cosmosanalysis/app/testdata/modules/single_app/go.mod index 5db6c247a4..83de7de5b2 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/single_app/go.mod +++ b/ignite/pkg/cosmosanalysis/app/testdata/modules/single_app/go.mod @@ -8,25 +8,23 @@ require ( 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/bufbuild/buf v1.32.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/golang/protobuf v1.5.4 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/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 - google.golang.org/grpc v1.55.0 + google.golang.org/grpc v1.64.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.34.1 ) - - diff --git a/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/go.mod b/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/go.mod index 39414c01ea..ba50cdde55 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/go.mod +++ b/ignite/pkg/cosmosanalysis/app/testdata/modules/spn/go.mod @@ -7,7 +7,7 @@ require ( cosmossdk.io/errors v1.0.0-beta.7 cosmossdk.io/math v1.0.1 github.com/aws/smithy-go v1.8.0 - github.com/bufbuild/buf v1.22.0 + github.com/bufbuild/buf v1.32.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 @@ -15,7 +15,7 @@ require ( github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.2.0 github.com/gogo/protobuf v1.3.2 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/golangci/golangci-lint v1.50.1 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -23,15 +23,15 @@ require ( github.com/ignite/modules v0.0.2 github.com/pkg/errors v0.9.1 github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/tendermint/fundraising v0.4.1 - golang.org/x/tools v0.10.0 - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 - google.golang.org/grpc v1.55.0 + golang.org/x/tools v0.21.0 + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 + google.golang.org/grpc v1.64.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v2 v2.4.0 mvdan.cc/gofumpt v0.5.0 ) @@ -40,11 +40,11 @@ replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.2021 require ( 4d63.com/gochecknoglobals v0.1.0 // indirect - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.19.1 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute v1.25.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.0.0 // indirect - cloud.google.com/go/storage v1.30.1 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.38.0 // indirect cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.3 // indirect cosmossdk.io/log v1.1.0 // indirect @@ -81,9 +81,9 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/bufbuild/connect-go v1.8.0 // indirect github.com/bufbuild/connect-opentelemetry-go v0.3.0 // indirect - github.com/bufbuild/protocompile v0.5.1 // indirect + github.com/bufbuild/protocompile v0.13.1-0.20240510201809-752249dfc37f // indirect github.com/butuzov/ireturn v0.1.1 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charithe/durationcheck v0.0.9 // indirect @@ -93,7 +93,7 @@ require ( github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect - github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect + github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect @@ -101,11 +101,11 @@ require ( github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/daixiang0/gci v0.8.1 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect + github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect @@ -113,30 +113,30 @@ require ( github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/cli v24.0.2+incompatible // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.2+incompatible // indirect - github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/cli v26.1.2+incompatible // indirect + github.com/docker/distribution v2.8.3+incompatible // indirect + github.com/docker/docker v26.1.2+incompatible // indirect + github.com/docker/docker-credential-helpers v0.8.1 // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/esimonov/ifshort v1.0.4 // indirect github.com/ettle/strcase v0.1.1 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fatih/structtag v1.2.0 // indirect - github.com/felixge/fgprof v0.9.3 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/felixge/fgprof v0.9.4 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-chi/chi/v5 v5.0.8 // indirect + github.com/go-chi/chi/v5 v5.0.12 // indirect github.com/go-critic/go-critic v0.6.5 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-toolsmith/astcast v1.0.0 // indirect github.com/go-toolsmith/astcopy v1.0.2 // indirect @@ -149,9 +149,9 @@ require ( github.com/gobwas/glob v0.2.3 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.8.1 // indirect - github.com/gofrs/uuid/v5 v5.0.0 // indirect + github.com/gofrs/uuid/v5 v5.2.0 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -165,14 +165,14 @@ require ( github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/go-containerregistry v0.15.2 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-containerregistry v0.19.1 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 // indirect - github.com/google/s2a-go v0.1.3 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.8.0 // indirect + github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.2 // indirect github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect @@ -208,7 +208,7 @@ require ( github.com/kisielk/errcheck v1.6.2 // indirect github.com/kisielk/gotool v1.0.0 // indirect github.com/kkHAIKE/contextcheck v1.1.3 // indirect - github.com/klauspost/compress v1.16.6 // indirect + github.com/klauspost/compress v1.17.8 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.6 // indirect @@ -246,11 +246,11 @@ require ( github.com/nishanths/predeclared v0.2.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc3 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polyfloyd/go-errorlint v1.0.5 // indirect @@ -264,7 +264,7 @@ require ( github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rs/cors v1.9.0 // indirect + github.com/rs/cors v1.11.0 // indirect github.com/rs/zerolog v1.29.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/ryancurrah/gomodguard v1.2.4 // indirect @@ -286,7 +286,7 @@ require ( github.com/spf13/viper v1.16.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tdakkota/asciicheck v0.1.1 // indirect @@ -303,7 +303,7 @@ require ( github.com/ultraware/funlen v0.0.3 // indirect github.com/ultraware/whitespace v0.0.5 // indirect github.com/uudashr/gocognit v1.0.6 // indirect - github.com/vbatts/tar-split v0.11.3 // indirect + github.com/vbatts/tar-split v0.11.5 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.2.0 // indirect github.com/zondax/hid v0.9.1 // indirect @@ -311,26 +311,26 @@ require ( gitlab.com/bosi/decorder v0.2.3 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.16.0 // indirect - go.opentelemetry.io/otel/metric v1.16.0 // indirect - go.opentelemetry.io/otel/sdk v1.16.0 // indirect - go.opentelemetry.io/otel/trace v1.16.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.10.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/net v0.11.0 // indirect - golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/term v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.122.0 // indirect - google.golang.org/appengine v1.6.7 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + google.golang.org/api v0.169.0 // indirect + google.golang.org/appengine v1.6.8 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.3.3 // indirect diff --git a/ignite/pkg/cosmosver/testdata/chain-sdk-local-fork/go.mod b/ignite/pkg/cosmosver/testdata/chain-sdk-local-fork/go.mod index 71f55203a6..f7be19c18f 100644 --- a/ignite/pkg/cosmosver/testdata/chain-sdk-local-fork/go.mod +++ b/ignite/pkg/cosmosver/testdata/chain-sdk-local-fork/go.mod @@ -16,7 +16,7 @@ require ( cosmossdk.io/x/evidence v0.1.0 cosmossdk.io/x/feegrant v0.1.0 cosmossdk.io/x/upgrade v0.1.1 - github.com/bufbuild/buf v1.27.2 + github.com/bufbuild/buf v1.32.1 github.com/cometbft/cometbft v0.38.2 github.com/cosmos/cosmos-db v1.0.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 diff --git a/ignite/templates/app/files/go.mod.plush b/ignite/templates/app/files/go.mod.plush index 775f49318d..b20715a3b7 100644 --- a/ignite/templates/app/files/go.mod.plush +++ b/ignite/templates/app/files/go.mod.plush @@ -27,7 +27,7 @@ require ( <%= if (IsConsumerChain) { %> github.com/cosmos/interchain-security/v5 v5.0.0 <% } %> - github.com/bufbuild/buf v1.30.1 + github.com/bufbuild/buf v1.32.1 github.com/cometbft/cometbft v0.38.7 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 diff --git a/integration/doctor/testdata/missing-tools.go.txt b/integration/doctor/testdata/missing-tools.go.txt index 2fbd1e6475..fc0759b578 100644 --- a/integration/doctor/testdata/missing-tools.go.txt +++ b/integration/doctor/testdata/missing-tools.go.txt @@ -17,7 +17,7 @@ version: 1 module github.com/ignite/cli require ( - github.com/bufbuild/buf v1.30.1 + github.com/bufbuild/buf v1.32.1 ) go 1.20 From 6dc0147c5f92fbef22056ef94c98ecf866789271 Mon Sep 17 00:00:00 2001 From: Pantani Date: Wed, 22 May 2024 16:20:03 +0200 Subject: [PATCH 13/14] bump protobuf pkgs for buf --- ignite/internal/plugin/testdata/execute_fail/go.mod | 3 +-- ignite/internal/plugin/testdata/execute_ok/go.mod | 3 +-- ignite/templates/app/files/go.mod.plush | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ignite/internal/plugin/testdata/execute_fail/go.mod b/ignite/internal/plugin/testdata/execute_fail/go.mod index 8e9e736a5b..692db54a4b 100644 --- a/ignite/internal/plugin/testdata/execute_fail/go.mod +++ b/ignite/internal/plugin/testdata/execute_fail/go.mod @@ -82,7 +82,6 @@ require ( github.com/xanzy/ssh-agent v0.3.3 // indirect go.etcd.io/bbolt v1.3.9 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.7.0 // indirect @@ -95,5 +94,5 @@ require ( google.golang.org/grpc v1.64.0 // indirect google.golang.org/protobuf v1.34.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/ignite/internal/plugin/testdata/execute_ok/go.mod b/ignite/internal/plugin/testdata/execute_ok/go.mod index 492d50daa7..30c13651f0 100644 --- a/ignite/internal/plugin/testdata/execute_ok/go.mod +++ b/ignite/internal/plugin/testdata/execute_ok/go.mod @@ -82,7 +82,6 @@ require ( github.com/xanzy/ssh-agent v0.3.3 // indirect go.etcd.io/bbolt v1.3.9 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.7.0 // indirect @@ -95,5 +94,5 @@ require ( google.golang.org/grpc v1.64.0 // indirect google.golang.org/protobuf v1.34.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/ignite/templates/app/files/go.mod.plush b/ignite/templates/app/files/go.mod.plush index b20715a3b7..0d9999094c 100644 --- a/ignite/templates/app/files/go.mod.plush +++ b/ignite/templates/app/files/go.mod.plush @@ -43,9 +43,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 - golang.org/x/tools v0.20.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa - google.golang.org/grpc v1.63.2 + golang.org/x/tools v0.21.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 + google.golang.org/grpc v1.64.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 ) \ No newline at end of file From 7817f4ccf95bd82be7c5478e5181adefdac26c42 Mon Sep 17 00:00:00 2001 From: Pantani Date: Wed, 22 May 2024 17:57:42 +0200 Subject: [PATCH 14/14] check if the folder has proto before update buf dependencies --- ignite/pkg/cosmosbuf/buf.go | 15 +++++++++++---- ignite/pkg/cosmosgen/generate.go | 8 +++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ignite/pkg/cosmosbuf/buf.go b/ignite/pkg/cosmosbuf/buf.go index 7cca72ad60..9cc0ed0195 100644 --- a/ignite/pkg/cosmosbuf/buf.go +++ b/ignite/pkg/cosmosbuf/buf.go @@ -148,27 +148,34 @@ func (c Command) String() string { // Update updates module dependencies. // By default updates all dependencies unless one or more dependencies are specified. func (b Buf) Update(ctx context.Context, modDir string) error { - cmd, err := b.command(CMDDep, nil, "update", modDir) + files, err := xos.FindFilesExtension(modDir, xos.ProtoFile) if err != nil { return err } + if len(files) == 0 { + return errors.Errorf("%w: %s", ErrProtoFilesNotFound, modDir) + } + cmd, err := b.command(CMDDep, nil, "update", modDir) + if err != nil { + return err + } return b.runCommand(ctx, cmd...) } // Export runs the buf Export command for the files in the proto directory. func (b Buf) Export(ctx context.Context, protoDir, output string) error { - specs, err := xos.FindFilesExtension(protoDir, xos.ProtoFile) + files, err := xos.FindFilesExtension(protoDir, xos.ProtoFile) if err != nil { return err } - if len(specs) == 0 { + if len(files) == 0 { return errors.Errorf("%w: %s", ErrProtoFilesNotFound, protoDir) } + flags := map[string]string{ flagOutput: output, } - cmd, err := b.command(CMDExport, flags, protoDir) if err != nil { return err diff --git a/ignite/pkg/cosmosgen/generate.go b/ignite/pkg/cosmosgen/generate.go index 5a1588a5a1..3a1212d856 100644 --- a/ignite/pkg/cosmosgen/generate.go +++ b/ignite/pkg/cosmosgen/generate.go @@ -335,7 +335,13 @@ func (g generator) updateBufModule(ctx context.Context) error { } } } - return g.buf.Update(ctx, filepath.Dir(g.appIncludes.BufPath)) + if err := g.buf.Update( + ctx, + filepath.Dir(g.appIncludes.BufPath), + ); err != nil && !errors.Is(err, cosmosbuf.ErrProtoFilesNotFound) { + return err + } + return nil } func (g generator) resolveBufDependency(pkgName, bufPath string) error {