From b37c80ce746a28233e2b21099fec9758d9941cd1 Mon Sep 17 00:00:00 2001 From: julienrbrt Date: Thu, 2 Oct 2025 21:35:25 +0200 Subject: [PATCH 1/5] feat(cosmosgen): fetch fallback buf token (#4805) * feat(cosmosgen): fetch fallback buf token * package refactor * fix `CaptureException called with nil error` * cl * updates * updates * feedback (cherry picked from commit 3919d6bbb0748486b182e5a228975a10f225bfae) # Conflicts: # ignite/cmd/bubblemodel/chain_serve.go # ignite/cmd/cmd.go # ignite/internal/analytics/analytics.go # ignite/internal/announcements/announcement_test.go # ignite/pkg/cosmosgen/generate_typescript.go # ignite/pkg/gocmd/gocmd_test.go # ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml # ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml --- changelog.md | 206 ++++++++++++++++++ ignite/cmd/bubblemodel/chain_serve.go | 8 + ignite/cmd/cmd.go | 21 ++ ignite/internal/analytics/analytics.go | 10 + .../announcements/announcement.go | 15 +- .../announcements/announcement_test.go | 10 +- ignite/internal/buf/buf.go | 39 ++++ ignite/internal/buf/buf_test.go | 69 ++++++ ignite/{pkg => internal}/sentry/sentry.go | 0 ignite/pkg/cosmosgen/generate_typescript.go | 93 ++++++++ ignite/pkg/errors/xerrors.go | 14 +- ignite/pkg/gocmd/gocmd.go | 8 - ignite/pkg/gocmd/gocmd_test.go | 12 +- .../app/files/proto/buf.gen.sta.yaml | 2 +- .../app/files/proto/buf.gen.swagger.yaml | 2 +- .../templates/app/files/proto/buf.gen.ts.yaml | 2 +- .../app/files/{{protoDir}}/buf.gen.gogo.yaml | 24 ++ .../files/{{protoDir}}/buf.gen.swagger.yaml | 19 ++ 18 files changed, 519 insertions(+), 35 deletions(-) rename ignite/{pkg => internal}/announcements/announcement.go (78%) rename ignite/{pkg => internal}/announcements/announcement_test.go (79%) create mode 100644 ignite/internal/buf/buf.go create mode 100644 ignite/internal/buf/buf_test.go rename ignite/{pkg => internal}/sentry/sentry.go (100%) create mode 100644 ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml create mode 100644 ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml diff --git a/changelog.md b/changelog.md index 3f53c3c879..e982f06751 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,212 @@ ## Unreleased +### Changes + +- [#4807](https://github.com/ignite/cli/pull/4807) Improve unconfigured path message when building a chain. +- [#4805](https://github.com/ignite/cli/pull/4805) Fetch fallback buf token. + +## [`v29.4.0`](https://github.com/ignite/cli/releases/tag/v29.4.0) + +### Features + +- [#4790](https://github.com/ignite/cli/pull/4790) Remove global vars and struct placeholders. +- [#4797](https://github.com/ignite/cli/pull/4797) Add `xast` function to append new switch clause. +- [#4804](https://github.com/ignite/cli/pull/4804) Add `BroadcastAsync` to `cosmosclient` package. + +### Changes + +- [#4794](https://github.com/ignite/cli/pull/4794) Update `cosmossdk.io/log` version to `v1.6.1` and remove `bytedance/sonic` version override from template. + +### Fixes + +- [#4803](https://github.com/ignite/cli/pull/4803) Fix simulations for custom address prefix. + +## [`v29.3.1`](https://github.com/ignite/cli/releases/tag/v29.3.1) + +### Fixes + +- [#4793](https://github.com/ignite/cli/pull/4793) Use latest `bytedance/sonic` version to support Go 1.25. + +## [`v29.3.0`](https://github.com/ignite/cli/releases/tag/v29.3.0) + +### Features + +- [#4786](https://github.com/ignite/cli/pull/4786) Add all types to the documentation and disclaimer for multiple coin types. + +### Changes + +- [#4780](https://github.com/ignite/cli/pull/4780) Fallback to local generation when possible in `generate ts-client` command. +- [#4779](https://github.com/ignite/cli/pull/4779) Do not re-gen openapi spec each time the `ts-client` or the `composables` are generated. +- [#4784](https://github.com/ignite/cli/pull/4784) Remove unused message initialization. + +### Fixes + +- [#4779](https://github.com/ignite/cli/pull/4779) Find proto dir in non conventional repo structure. + +## [`v29.2.0`](https://github.com/ignite/cli/releases/tag/v29.2.0) + +### Features + +- [#4676](https://github.com/ignite/cli/issues/4676) Add Decimal Coin Type. +- [#4765](https://github.com/ignite/cli/pull/4765) Create `scaffold type-list` command. +- [#4770](https://github.com/ignite/cli/pull/4770) Add `--output-file` flag to `chain serve` command to improve running `chain serve` in the background. + +### Changes + +- [#4759](https://github.com/ignite/cli/pull/4759) Remove undocumented RPC address override in services chainer. +- [#4760](https://github.com/ignite/cli/pull/4760) Bump Cosmos SDK to `v0.53.3`. + +### Fixes + +- [#4757](https://github.com/ignite/cli/pull/4757) Always delete temp folder from open api generation. + +## [`v29.1.0`](https://github.com/ignite/cli/releases/tag/v29.1.0) + +### Features + +- [#4728](https://github.com/ignite/cli/pull/4728) Ask before overwriting a `xgenny` file. +- [#4731](https://github.com/ignite/cli/pull/4731) Complete IBC v2 wiring. +- [#4732](https://github.com/ignite/cli/pull/4732) Add `ignite chain modules list` command to list all modules in the chain. + +### Changes + +- [#4717](https://github.com/ignite/cli/pull/4717) Bump Cosmos SDK to `v0.53.2`. +- [#4718](https://github.com/ignite/cli/pull/4718) Bump default Ignite Apps. +- [#4741](https://github.com/ignite/cli/pull/4741) Let `generate openapi` generate external modules OpenAPI spec. +- [#4747](https://github.com/ignite/cli/pull/4747) Improve Ignite UI. +- [#4751](https://github.com/ignite/cli/pull/4751) Improve cache speed and limit duplicate I/O. + +### Fixes + +- [#4691](https://github.com/ignite/cli/pull/4691), [#4706](https://github.com/ignite/cli/pull/4706), [#4725](https://github.com/ignite/cli/pull/4725), [#4737](https://github.com/ignite/cli/pull/4737) Fix ts-client query template and solely Go template for `ts-client` generation. +- [#4742](https://github.com/ignite/cli/pull/4742) Updates Vue composables template for new ts-client and tanstack/vue-query v5 +- [#4744](https://github.com/ignite/cli/pull/4744) Remove `react` frontend generation via `s react` command. Use the [Ignite CCA App](https://github.com/ignite/apps) instead. + +## [`v29.0.0`](https://github.com/ignite/cli/releases/tag/v29.0.0) + +### Features + +- [#4614](https://github.com/ignite/cli/pull/4614) Improve integration tests and add query tests. +- [#4683](https://github.com/ignite/cli/pull/4683) Allow to change default denom via flag. +- [#4687](https://github.com/ignite/cli/pull/4687) Add address type with `scalar` annotations, and add `scalar` type to signer field. + +### Changes + +- [#4689](https://github.com/ignite/cli/pull/4689) Revert `HasGenesis` implementation from retracted `core` v1 to SDK `HasGenesis` interface. +- [#4701](https://github.com/ignite/cli/pull/4701) Improve `ignite doctor` by removing manual migration step. Additionally, remove protoc to buf migrations logic. +- [#4703](https://github.com/ignite/cli/pull/4703) Remove testutil.Register function. +- [#4702](https://github.com/ignite/cli/pull/4702) Improve app detection by checking for inheritance instead of interface implementation. +- [#4707](https://github.com/ignite/cli/pull/4707) Show `buf` version in `ignite version` only when in a go module. +- [#4709](https://github.com/ignite/cli/pull/4709) Remove legacy msgServer support +- [#4710](https://github.com/ignite/cli/pull/4710) Remove the `nullify` pkg from the chain `testutil` + +### Fixes + +- [#4686](https://github.com/ignite/cli/pull/4686) Filter discovered protos to only messages. +- [#4694](https://github.com/ignite/cli/issues/4694) Install an app using the `.` as a current path show a wrong app name. + +## [`v29.0.0-rc.1`](https://github.com/ignite/cli/releases/tag/v29.0.0-rc.1) + +### Features + +- [#4509](https://github.com/ignite/cli/pull/4509) Upgrade to Go 1.24. Running `ignite doctor` migrates the scaffolded `tools.go` to the tool directive in the go.mod +- [#4588](https://github.com/ignite/cli/pull/4588) Run `buf format after scaffold proto files. +- [#4603](https://github.com/ignite/cli/issues/4603) Add `GetIgniteInfo` gRPC API for apps. +- [#4657](https://github.com/ignite/cli/pull/4657) Upgrade to Cosmos SDK [v0.53.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.53.0). + - Add x/epochs module to default template (except for minimal template). + - Bump minimum compatible Cosmos SDK version to `v0.50.0`. + +### Changes + +- [#4596](https://github.com/ignite/cli/pull/4596) Add default `openapi.yml` when skipping proto gen. +- [#4601](https://github.com/ignite/cli/pull/4601) Add `appregistry` as default plugin +- [#4613](https://github.com/ignite/cli/pull/4613) Improve and simplify prompting logic by bubbletea. +- [#4624](https://github.com/ignite/cli/pull/4624) Fix autocli templates for variadics. +- [#4644](https://github.com/ignite/cli/pull/4644) Improve UI and UX for `testnet multi-node` command. +- [#4645](https://github.com/ignite/cli/pull/4645) Refactor the xast.ModifyFunction to improve the readability. +- [#3393](https://github.com/ignite/cli/issues/3393) Remove xgenny embed walker +- [#4664](https://github.com/ignite/cli/pull/4664) Add verbose flags on `scaffold` and `generate` commands. + - The flag displays the steps Ignite is taking to generate the code. + - The verbosity only applies to the command. For full verbosity use the `IGNT_DEBUG` environment variable instead. + +### Fixes + +- [#4347](https://github.com/ignite/cli/pull/4347) Fix `ts-client` generation +- [#4577](https://github.com/ignite/cli/pull/4577) Add proto version to query path. +- [#4579](https://github.com/ignite/cli/pull/4579) Fix empty params response. +- [#4585](https://github.com/ignite/cli/pull/4585) Fix faucet cmd issue. +- [#4587](https://github.com/ignite/cli/pull/4587) Add missing light clients routes to IBC client keeper. +- [#4595](https://github.com/ignite/cli/pull/4595) Fix wrong InterfaceRegistry for IBC modules. +- [#4609](https://github.com/ignite/cli/pull/4609) Add work dir for relayer integration tests. +- [#4658](https://github.com/ignite/cli/pull/4658) Fix indentation for params scaffolded into a struct. +- [#4582](https://github.com/ignite/cli/issues/4582) Fix xast misplacing comments. +- [#4660](https://github.com/ignite/cli/pull/4660) Fix xast test case indentation. +- [#4667](https://github.com/ignite/cli/pull/4667) Harden `IsSlice` + +## [`v29.0.0-beta.1`](https://github.com/ignite/cli/releases/tag/v29.0.0-beta.1) + +### Features + +- [#3707](https://github.com/ignite/cli/pull/3707) and [#4094](https://github.com/ignite/cli/pull/4094) Add collections support. +- [#3977](https://github.com/ignite/cli/pull/3977) Add `chain lint` command to lint the chain's codebase using `golangci-lint` +- [#3770](https://github.com/ignite/cli/pull/3770) Add `scaffold configs` and `scaffold params` commands +- [#4001](https://github.com/ignite/cli/pull/4001) Improve `xgenny` dry run +- [#3967](https://github.com/ignite/cli/issues/3967) Add HD wallet parameters `address index` and `account number` to the chain account config +- [#4004](https://github.com/ignite/cli/pull/4004) Remove all import placeholders using the `xast` pkg +- [#4071](https://github.com/ignite/cli/pull/4071) Support custom proto path +- [#3718](https://github.com/ignite/cli/pull/3718) Add `gen-mig-diffs` tool app to compare scaffold output of two versions of ignite +- [#4100](https://github.com/ignite/cli/pull/4100) Set the `proto-dir` flag only for the `scaffold chain` command and use the proto path from the config +- [#4111](https://github.com/ignite/cli/pull/4111) Remove vuex generation +- [#4113](https://github.com/ignite/cli/pull/4113) Generate chain config documentation automatically +- [#4131](https://github.com/ignite/cli/pull/4131) Support `bytes` as data type in the `scaffold` commands +- [#4300](https://github.com/ignite/cli/pull/4300) Only panics the module in the most top function level +- [#4327](https://github.com/ignite/cli/pull/4327) Use the TxConfig from simState instead create a new one +- [#4326](https://github.com/ignite/cli/pull/4326) Add `buf.build` version to `ignite version` command +- [#4436](https://github.com/ignite/cli/pull/4436) Return tx hash to the faucet API +- [#4437](https://github.com/ignite/cli/pull/4437) Remove module placeholders +- [#4289](https://github.com/ignite/cli/pull/4289), [#4423](https://github.com/ignite/cli/pull/4423), [#4432](https://github.com/ignite/cli/pull/4432), [#4507](https://github.com/ignite/cli/pull/4507), [#4524](https://github.com/ignite/cli/pull/4524) Cosmos SDK v0.52 support and downgrade back to 0.50, while keeping latest improvements. +- [#4480](https://github.com/ignite/cli/pull/4480) Add field max length +- [#4477](https://github.com/ignite/cli/pull/4477), [#4559](https://github.com/ignite/cli/pull/4559) IBC v10 support +- [#4166](https://github.com/ignite/cli/issues/4166) Migrate buf config files to v2 +- [#4494](https://github.com/ignite/cli/pull/4494) Automatic migrate the buf configs to v2 + +### Changes + +- [#4094](https://github.com/ignite/cli/pull/4094) Scaffolding a multi-index map using `ignite s map foo bar baz --index foobar,foobaz` is no longer supported. Use one index instead of use `collections.IndexedMap`. +- [#4058](https://github.com/ignite/cli/pull/4058) Simplify scaffolded modules by including `ValidateBasic()` logic in message handler. +- [#4058](https://github.com/ignite/cli/pull/4058) Use `address.Codec` instead of `AccAddressFromBech32`. +- [#3993](https://github.com/ignite/cli/pull/3993) Oracle scaffolding was deprecated and has been removed +- [#3962](https://github.com/ignite/cli/pull/3962) Rename all RPC endpoints and autocli commands generated for `map`/`list`/`single` types +- [#3976](https://github.com/ignite/cli/pull/3976) Remove error checks for Cobra command value get calls +- [#4002](https://github.com/ignite/cli/pull/4002) Bump buf build +- [#4008](https://github.com/ignite/cli/pull/4008) Rename `pkg/yaml` to `pkg/xyaml` +- [#4075](https://github.com/ignite/cli/pull/4075) Use `gopkg.in/yaml.v3` instead `gopkg.in/yaml.v2` +- [#4118](https://github.com/ignite/cli/pull/4118) Version scaffolded protos as `v1` to follow SDK structure. +- [#4167](https://github.com/ignite/cli/pull/4167) Scaffold `int64` instead of `int32` when a field type is `int` +- [#4159](https://github.com/ignite/cli/pull/4159) Enable gci linter +- [#4160](https://github.com/ignite/cli/pull/4160) Enable copyloopvar linter +- [#4162](https://github.com/ignite/cli/pull/4162) Enable errcheck linter +- [#4189](https://github.com/ignite/cli/pull/4189) Deprecate `ignite node` for `ignite connect` app +- [#4290](https://github.com/ignite/cli/pull/4290) Remove ignite ics logic from ignite cli (this functionality will be in the `consumer` app) +- [#4295](https://github.com/ignite/cli/pull/4295) Stop scaffolding `pulsar` files +- [#4317](https://github.com/ignite/cli/pull/4317) Remove xchisel dependency +- [#4361](https://github.com/ignite/cli/pull/4361) Remove unused `KeyPrefix` method +- [#4384](https://github.com/ignite/cli/pull/4384) Compare genesis params into chain genesis tests +- [#4463](https://github.com/ignite/cli/pull/4463) Run `chain simulation` with any simulation test case +- [#4533](https://github.com/ignite/cli/pull/4533) Promote GitHub codespace instead of Gitpod +- [#4549](https://github.com/ignite/cli/pull/4549) Remove unused placeholder vars +- [#4557](https://github.com/ignite/cli/pull/4557) Remove github.com/gookit/color + +### Fixes + +- [#4000](https://github.com/ignite/cli/pull/4000) Run all dry runners before the wet run in the `xgenny` pkg +- [#4091](https://github.com/ignite/cli/pull/4091) Fix race conditions in the plugin logic +- [#4128](https://github.com/ignite/cli/pull/4128) Check for duplicate proto fields in config +- [#4402](https://github.com/ignite/cli/pull/4402) Fix gentx parser into the cosmosutil package +- [#4552](https://github.com/ignite/cli/pull/4552) Avoid direct access to proto field `perms.Account` and `perms.Permissions` +- [#4555](https://github.com/ignite/cli/pull/4555) Fix buf lint issues into the chain code + ## [`v28.11.0`](https://github.com/ignite/cli/releases/tag/v28.11.0) ### Changes diff --git a/ignite/cmd/bubblemodel/chain_serve.go b/ignite/cmd/bubblemodel/chain_serve.go index 1a66f124f0..83994a9e58 100644 --- a/ignite/cmd/bubblemodel/chain_serve.go +++ b/ignite/cmd/bubblemodel/chain_serve.go @@ -7,11 +7,19 @@ import ( tea "github.com/charmbracelet/bubbletea" +<<<<<<< HEAD "github.com/ignite/cli/v28/ignite/pkg/announcements" "github.com/ignite/cli/v28/ignite/pkg/cliui/colors" "github.com/ignite/cli/v28/ignite/pkg/cliui/icons" cliuimodel "github.com/ignite/cli/v28/ignite/pkg/cliui/model" "github.com/ignite/cli/v28/ignite/pkg/events" +======= + "github.com/ignite/cli/v29/ignite/internal/announcements" + "github.com/ignite/cli/v29/ignite/pkg/cliui/colors" + "github.com/ignite/cli/v29/ignite/pkg/cliui/icons" + cliuimodel "github.com/ignite/cli/v29/ignite/pkg/cliui/model" + "github.com/ignite/cli/v29/ignite/pkg/events" +>>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) ) const ( diff --git a/ignite/cmd/cmd.go b/ignite/cmd/cmd.go index 7885a27cc9..0903effdf4 100644 --- a/ignite/cmd/cmd.go +++ b/ignite/cmd/cmd.go @@ -12,6 +12,7 @@ import ( "github.com/spf13/cobra" flag "github.com/spf13/pflag" +<<<<<<< HEAD "github.com/ignite/cli/v28/ignite/config" "github.com/ignite/cli/v28/ignite/pkg/announcements" "github.com/ignite/cli/v28/ignite/pkg/cache" @@ -22,6 +23,26 @@ import ( "github.com/ignite/cli/v28/ignite/pkg/gitpod" "github.com/ignite/cli/v28/ignite/pkg/goenv" "github.com/ignite/cli/v28/ignite/version" +======= + "github.com/ignite/cli/v29/ignite/config" + chainconfig "github.com/ignite/cli/v29/ignite/config/chain" + "github.com/ignite/cli/v29/ignite/internal/announcements" + "github.com/ignite/cli/v29/ignite/pkg/cache" + "github.com/ignite/cli/v29/ignite/pkg/cliui" + uilog "github.com/ignite/cli/v29/ignite/pkg/cliui/log" + "github.com/ignite/cli/v29/ignite/pkg/dircache" + "github.com/ignite/cli/v29/ignite/pkg/errors" + "github.com/ignite/cli/v29/ignite/pkg/goenv" + "github.com/ignite/cli/v29/ignite/pkg/gomodulepath" + "github.com/ignite/cli/v29/ignite/version" +) + +type key int + +const ( + keyChainConfig key = iota + keyChainConfigPath key = iota +>>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) ) const ( diff --git a/ignite/internal/analytics/analytics.go b/ignite/internal/analytics/analytics.go index fbe618a552..5bc10a5018 100644 --- a/ignite/internal/analytics/analytics.go +++ b/ignite/internal/analytics/analytics.go @@ -12,12 +12,22 @@ import ( "github.com/manifoldco/promptui" "github.com/spf13/cobra" +<<<<<<< HEAD "github.com/ignite/cli/v28/ignite/config" "github.com/ignite/cli/v28/ignite/pkg/gitpod" "github.com/ignite/cli/v28/ignite/pkg/matomo" "github.com/ignite/cli/v28/ignite/pkg/randstr" "github.com/ignite/cli/v28/ignite/pkg/sentry" "github.com/ignite/cli/v28/ignite/version" +======= + "github.com/ignite/cli/v29/ignite/config" + "github.com/ignite/cli/v29/ignite/internal/sentry" + "github.com/ignite/cli/v29/ignite/pkg/cliui" + "github.com/ignite/cli/v29/ignite/pkg/errors" + "github.com/ignite/cli/v29/ignite/pkg/matomo" + "github.com/ignite/cli/v29/ignite/pkg/randstr" + "github.com/ignite/cli/v29/ignite/version" +>>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) ) const ( diff --git a/ignite/pkg/announcements/announcement.go b/ignite/internal/announcements/announcement.go similarity index 78% rename from ignite/pkg/announcements/announcement.go rename to ignite/internal/announcements/announcement.go index 6c66e740f3..78e2879630 100644 --- a/ignite/pkg/announcements/announcement.go +++ b/ignite/internal/announcements/announcement.go @@ -11,14 +11,10 @@ import ( ) var ( - SurveyLink = "https://bit.ly/3WZS2uS" - APIURL = "http://announcements.ignite.com/v1/announcements" + SurveyLink = "https://bit.ly/3WZS2uS" + AnnouncementURL = "https://api.ignite.com/v1/announcements" ) -type api struct { - Announcements []announcement `json:"announcements"` -} - type announcement struct { ID string `json:"id"` Text string `json:"text"` @@ -28,13 +24,16 @@ type announcement struct { // Fetch fetches the latest announcements from the API. func Fetch() string { - resp, err := http.Get(APIURL) //nolint:gosec + resp, err := http.Get(AnnouncementURL) //nolint:gosec if err != nil || resp.StatusCode != 200 { return fallbackData() } defer resp.Body.Close() - var data api + type response struct { + Announcements []announcement `json:"announcements"` + } + var data response if err := json.NewDecoder(resp.Body).Decode(&data); err != nil { return fallbackData() } diff --git a/ignite/pkg/announcements/announcement_test.go b/ignite/internal/announcements/announcement_test.go similarity index 79% rename from ignite/pkg/announcements/announcement_test.go rename to ignite/internal/announcements/announcement_test.go index 80e8a1a38a..57ca5edc5d 100644 --- a/ignite/pkg/announcements/announcement_test.go +++ b/ignite/internal/announcements/announcement_test.go @@ -6,7 +6,11 @@ import ( "net/http/httptest" "testing" +<<<<<<< HEAD:ignite/pkg/announcements/announcement_test.go "github.com/ignite/cli/v28/ignite/pkg/announcements" +======= + "github.com/ignite/cli/v29/ignite/internal/announcements" +>>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)):ignite/internal/announcements/announcement_test.go ) func TestFetchAnnouncements(t *testing.T) { @@ -52,9 +56,9 @@ func TestFetchAnnouncements(t *testing.T) { })) defer server.Close() - originalAPI := announcements.APIURL - announcements.APIURL = server.URL - defer func() { announcements.APIURL = originalAPI }() + originalAPI := announcements.AnnouncementURL + announcements.AnnouncementURL = server.URL + defer func() { announcements.AnnouncementURL = originalAPI }() result := announcements.Fetch() if result != tt.expected { diff --git a/ignite/internal/buf/buf.go b/ignite/internal/buf/buf.go new file mode 100644 index 0000000000..268ee2af27 --- /dev/null +++ b/ignite/internal/buf/buf.go @@ -0,0 +1,39 @@ +package buf + +import ( + "encoding/json" + "net/http" + "time" + + "github.com/ignite/cli/v29/ignite/pkg/errors" +) + +var BufTokenURL = "https://buf.ignite.com" //nolint:gosec // URL is hardcoded and not user-provided + +// FetchToken fetches the buf token from the Ignite API. +func FetchToken() (string, error) { + client := &http.Client{ + Timeout: 5 * time.Second, + } + + resp, err := client.Get(BufTokenURL) + if err != nil { + return "", err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + return "", errors.Errorf("HTTP request failed with status code: %d", resp.StatusCode) + } + + type tokenResponse struct { + Token string `json:"token"` + } + var tokenResp tokenResponse + + if err := json.NewDecoder(resp.Body).Decode(&tokenResp); err != nil { + return "", err + } + + return tokenResp.Token, nil +} diff --git a/ignite/internal/buf/buf_test.go b/ignite/internal/buf/buf_test.go new file mode 100644 index 0000000000..a2f167cd6e --- /dev/null +++ b/ignite/internal/buf/buf_test.go @@ -0,0 +1,69 @@ +package buf_test + +import ( + "net/http" + "net/http/httptest" + "testing" + + "github.com/ignite/cli/v29/ignite/internal/buf" + "github.com/stretchr/testify/require" +) + +func TestFetchToken(t *testing.T) { + tests := []struct { + name string + serverResponse string + statusCode int + expectedToken string + expectError bool + }{ + { + name: "successful token fetch", + serverResponse: `{"token":"test_token_123"}`, + statusCode: http.StatusOK, + expectedToken: "test_token_123", + expectError: false, + }, + { + name: "server error", + serverResponse: `{"error":"internal server error"}`, + statusCode: http.StatusInternalServerError, + expectedToken: "", + expectError: true, + }, + { + name: "invalid json response", + serverResponse: `invalid json`, + statusCode: http.StatusOK, + expectedToken: "", + expectError: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Create mock server + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(tt.statusCode) + w.Write([]byte(tt.serverResponse)) + })) + defer server.Close() + + // Temporarily override the endpoint + originalEndpoint := buf.BufTokenURL + buf.BufTokenURL = server.URL + defer func() { + buf.BufTokenURL = originalEndpoint + }() + + token, err := buf.FetchToken() + if tt.expectError { + require.Error(t, err) + require.Empty(t, token) + } else { + require.NoError(t, err) + require.Equal(t, tt.expectedToken, token) + } + }) + } +} diff --git a/ignite/pkg/sentry/sentry.go b/ignite/internal/sentry/sentry.go similarity index 100% rename from ignite/pkg/sentry/sentry.go rename to ignite/internal/sentry/sentry.go diff --git a/ignite/pkg/cosmosgen/generate_typescript.go b/ignite/pkg/cosmosgen/generate_typescript.go index 26b84204f8..0acc3cdf2d 100644 --- a/ignite/pkg/cosmosgen/generate_typescript.go +++ b/ignite/pkg/cosmosgen/generate_typescript.go @@ -9,6 +9,7 @@ import ( "golang.org/x/sync/errgroup" +<<<<<<< HEAD "github.com/ignite/cli/v28/ignite/pkg/cache" "github.com/ignite/cli/v28/ignite/pkg/cosmosanalysis/module" "github.com/ignite/cli/v28/ignite/pkg/cosmosbuf" @@ -20,6 +21,46 @@ var dirchangeCacheNamespace = "generate.typescript.dirchange" type tsGenerator struct { g *generator +======= + "github.com/ignite/cli/v29/ignite/internal/buf" + "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" +) + +var ( + bufTokenEnvName = "BUF_TOKEN" + + dirchangeCacheNamespace = "generate.typescript.dirchange" + + protocGenTSProtoBin = "protoc-gen-ts_proto" + + msgBufAuth = "Note: Buf is limits remote plugin requests from unauthenticated users on 'buf.build'. Intensively using this function will get you rate limited. Authenticate with 'buf registry login' to avoid this (https://buf.build/docs/generate/auth-required)." +) + +const localTSProtoTmpl = `version: v1 +plugins: + - plugin: ts_proto + out: . + opt: + - logtostderr=true + - allow_merge=true + - json_names_for_fields=false + - ts_proto_opt=snakeToCamel=true + - ts_proto_opt=esModuleInterop=true + - ts_proto_out=. +` + +type tsGenerator struct { + g *generator + tsTemplateFile string + isLocalProto bool + + // hasLocalBufToken indicates whether the user had already a local Buf token. + hasLocalBufToken bool +>>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) } type generatePayload struct { @@ -28,7 +69,59 @@ type generatePayload struct { } func newTSGenerator(g *generator) *tsGenerator { +<<<<<<< HEAD return &tsGenerator{g} +======= + tsg := &tsGenerator{g: g} + if _, err := exec.LookPath(protocGenTSProtoBin); err == nil { + tsg.isLocalProto = true + } + + if !tsg.isLocalProto { + if os.Getenv(bufTokenEnvName) == "" { + token, err := buf.FetchToken() + if err != nil { + log.Printf("No '%s' binary found in PATH, using remote buf plugin for Typescript generation. %s\n", protocGenTSProtoBin, msgBufAuth) + } else { + os.Setenv(bufTokenEnvName, token) + } + } else { + tsg.hasLocalBufToken = true + } + } + + return tsg +} + +func (g *tsGenerator) tsTemplate() (string, error) { + if !g.isLocalProto { + return g.g.tsTemplate(), nil + } + if g.tsTemplateFile != "" { + return g.tsTemplateFile, nil + } + f, err := os.CreateTemp("", "buf-gen-ts-*.yaml") + if err != nil { + return "", err + } + defer f.Close() + if _, err := f.WriteString(localTSProtoTmpl); err != nil { + return "", err + } + g.tsTemplateFile = f.Name() + return g.tsTemplateFile, nil +} + +func (g *tsGenerator) cleanup() { + if g.tsTemplateFile != "" { + os.Remove(g.tsTemplateFile) + } + + // unset ignite buf token from env + if !g.hasLocalBufToken { + os.Unsetenv(bufTokenEnvName) + } +>>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) } func (g *generator) tsTemplate() string { diff --git a/ignite/pkg/errors/xerrors.go b/ignite/pkg/errors/xerrors.go index bf7815d6af..39fd8be589 100644 --- a/ignite/pkg/errors/xerrors.go +++ b/ignite/pkg/errors/xerrors.go @@ -26,7 +26,7 @@ func New(msg string) error { } // Errorf aliases Newf(). -func Errorf(format string, args ...interface{}) error { +func Errorf(format string, args ...any) error { err := errors.Errorf(format, args...) sentry.CaptureException(err) return err @@ -42,16 +42,20 @@ func WithStack(err error) error { // Wrap wraps an error with a message prefix. A stack trace is retained. func Wrap(err error, msg string) error { errWrap := errors.Wrap(err, msg) - sentry.CaptureException(errWrap) + if err != nil { + sentry.CaptureException(errWrap) + } return errWrap } // Wrapf wraps an error with a formatted message prefix. A stack // trace is also retained. If the format is empty, no prefix is added, // but the extra arguments are still processed for reportable strings. -func Wrapf(err error, format string, args ...interface{}) error { +func Wrapf(err error, format string, args ...any) error { errWrap := errors.Wrapf(err, format, args...) - sentry.CaptureException(errWrap) + if err != nil { + sentry.CaptureException(errWrap) + } return errWrap } @@ -73,4 +77,4 @@ func Is(err, reference error) bool { return errors.Is(err, reference) } // matches a type if it is assignable to the target type, or if it has a method // As(interface{}) bool such that As(target) returns true. As will panic if target // is not a non-nil pointer to a type which implements error or is of interface type. -func As(err error, target interface{}) bool { return errors.As(err, target) } +func As(err error, target any) bool { return errors.As(err, target) } diff --git a/ignite/pkg/gocmd/gocmd.go b/ignite/pkg/gocmd/gocmd.go index ef4ee23e40..87bc3638f5 100644 --- a/ignite/pkg/gocmd/gocmd.go +++ b/ignite/pkg/gocmd/gocmd.go @@ -168,14 +168,6 @@ func Install(ctx context.Context, path string, pkgs []string, options ...exec.Op return exec.Exec(ctx, command, append(options, exec.StepOption(step.Workdir(path)))...) } -// IsInstallError returns true if err is interpreted as a go install error. -func IsInstallError(err error) bool { - if err == nil { - return false - } - return strings.Contains(err.Error(), "no required module provides package") -} - // Get runs go get pkgs on path with options. func Get(ctx context.Context, path string, pkgs []string, options ...exec.Option) error { command := []string{ diff --git a/ignite/pkg/gocmd/gocmd_test.go b/ignite/pkg/gocmd/gocmd_test.go index 5178b28e3e..4394116a97 100644 --- a/ignite/pkg/gocmd/gocmd_test.go +++ b/ignite/pkg/gocmd/gocmd_test.go @@ -7,18 +7,14 @@ import ( "github.com/stretchr/testify/assert" +<<<<<<< HEAD "github.com/ignite/cli/v28/ignite/pkg/errors" "github.com/ignite/cli/v28/ignite/pkg/gocmd" +======= + "github.com/ignite/cli/v29/ignite/pkg/gocmd" +>>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) ) -func TestIsInstallError(t *testing.T) { - assert.False(t, gocmd.IsInstallError(errors.New("oups"))) - - err := errors.New(`error while running command go install github.com/cosmos/gogoproto/protoc-gen-gocosmos google.golang.org/protobuf/cmd/protoc-gen-go github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2: no required module provides package github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2; to add it: - go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2`) - assert.True(t, gocmd.IsInstallError(err)) -} - func TestList(t *testing.T) { wd, err := os.Getwd() assert.NoError(t, err) diff --git a/ignite/templates/app/files/proto/buf.gen.sta.yaml b/ignite/templates/app/files/proto/buf.gen.sta.yaml index 4444f5e75c..adf0b0f474 100644 --- a/ignite/templates/app/files/proto/buf.gen.sta.yaml +++ b/ignite/templates/app/files/proto/buf.gen.sta.yaml @@ -1,4 +1,4 @@ -# This file is auto-generated from Ignite. You can edit +# This file is auto-generated by Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.sta.yaml diff --git a/ignite/templates/app/files/proto/buf.gen.swagger.yaml b/ignite/templates/app/files/proto/buf.gen.swagger.yaml index 58d30d86e8..0fa8788e85 100644 --- a/ignite/templates/app/files/proto/buf.gen.swagger.yaml +++ b/ignite/templates/app/files/proto/buf.gen.swagger.yaml @@ -1,4 +1,4 @@ -# This file is auto-generated from Ignite. You can edit +# This file is auto-generated by Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.swagger.yaml diff --git a/ignite/templates/app/files/proto/buf.gen.ts.yaml b/ignite/templates/app/files/proto/buf.gen.ts.yaml index c484fb3ad3..8bf943b5c8 100644 --- a/ignite/templates/app/files/proto/buf.gen.ts.yaml +++ b/ignite/templates/app/files/proto/buf.gen.ts.yaml @@ -1,4 +1,4 @@ -# This file is auto-generated from Ignite. You can edit +# This file is auto-generated by Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.ts.yaml diff --git a/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml b/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml new file mode 100644 index 0000000000..a3b72cc944 --- /dev/null +++ b/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml @@ -0,0 +1,24 @@ +# This file is auto-generated by Ignite. You can edit +# the file content but do not change the file name or path. +# +# buf.gen.gogo.yaml +# +version: v2 +plugins: + - local: ["go", "tool", "github.com/cosmos/gogoproto/protoc-gen-gocosmos"] + out: . + opt: + - plugins=grpc + - Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any + - Mcosmos/orm/v1/orm.proto=cosmossdk.io/orm + - Mcosmos/app/v1alpha1/module.proto=cosmossdk.io/api/cosmos/app/v1alpha1 + - local: + [ + "go", + "tool", + "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway", + ] + out: . + opt: + - logtostderr=true + - allow_colon_final_segments=true diff --git a/ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml b/ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml new file mode 100644 index 0000000000..d81685c33d --- /dev/null +++ b/ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml @@ -0,0 +1,19 @@ +# This file is auto-generated by Ignite. You can edit +# the file content but do not change the file name or path. +# +# buf.gen.swagger.yaml +# +version: v2 +plugins: + - local: + [ + "go", + "tool", + "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2", + ] + out: . + opt: + - logtostderr=true + - openapi_naming_strategy=fqn + - json_names_for_fields=false + - generate_unbound_methods=true From c85d8ed1c2e29b28d3d3de48fdd523687db55373 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 6 Oct 2025 13:30:11 +0200 Subject: [PATCH 2/5] conflicts --- changelog.md | 207 +----------------- ignite/cmd/bubblemodel/chain_serve.go | 10 +- ignite/cmd/cmd.go | 23 +- ignite/internal/analytics/analytics.go | 12 +- .../announcements/announcement_test.go | 6 +- ignite/internal/buf/buf.go | 2 +- ignite/internal/buf/buf_test.go | 2 +- ignite/pkg/cosmosgen/generate_typescript.go | 81 +------ ignite/pkg/gocmd/gocmd.go | 8 + ignite/pkg/gocmd/gocmd_test.go | 12 +- .../app/files/proto/buf.gen.sta.yaml | 2 +- .../app/files/proto/buf.gen.swagger.yaml | 2 +- .../templates/app/files/proto/buf.gen.ts.yaml | 2 +- 13 files changed, 31 insertions(+), 338 deletions(-) diff --git a/changelog.md b/changelog.md index e982f06751..612f4c7bf4 100644 --- a/changelog.md +++ b/changelog.md @@ -2,211 +2,10 @@ ## Unreleased -### Changes - -- [#4807](https://github.com/ignite/cli/pull/4807) Improve unconfigured path message when building a chain. -- [#4805](https://github.com/ignite/cli/pull/4805) Fetch fallback buf token. - -## [`v29.4.0`](https://github.com/ignite/cli/releases/tag/v29.4.0) - -### Features - -- [#4790](https://github.com/ignite/cli/pull/4790) Remove global vars and struct placeholders. -- [#4797](https://github.com/ignite/cli/pull/4797) Add `xast` function to append new switch clause. -- [#4804](https://github.com/ignite/cli/pull/4804) Add `BroadcastAsync` to `cosmosclient` package. - -### Changes - -- [#4794](https://github.com/ignite/cli/pull/4794) Update `cosmossdk.io/log` version to `v1.6.1` and remove `bytedance/sonic` version override from template. - -### Fixes - -- [#4803](https://github.com/ignite/cli/pull/4803) Fix simulations for custom address prefix. - -## [`v29.3.1`](https://github.com/ignite/cli/releases/tag/v29.3.1) - -### Fixes - -- [#4793](https://github.com/ignite/cli/pull/4793) Use latest `bytedance/sonic` version to support Go 1.25. - -## [`v29.3.0`](https://github.com/ignite/cli/releases/tag/v29.3.0) - -### Features - -- [#4786](https://github.com/ignite/cli/pull/4786) Add all types to the documentation and disclaimer for multiple coin types. - -### Changes - -- [#4780](https://github.com/ignite/cli/pull/4780) Fallback to local generation when possible in `generate ts-client` command. -- [#4779](https://github.com/ignite/cli/pull/4779) Do not re-gen openapi spec each time the `ts-client` or the `composables` are generated. -- [#4784](https://github.com/ignite/cli/pull/4784) Remove unused message initialization. - -### Fixes - -- [#4779](https://github.com/ignite/cli/pull/4779) Find proto dir in non conventional repo structure. - -## [`v29.2.0`](https://github.com/ignite/cli/releases/tag/v29.2.0) - -### Features - -- [#4676](https://github.com/ignite/cli/issues/4676) Add Decimal Coin Type. -- [#4765](https://github.com/ignite/cli/pull/4765) Create `scaffold type-list` command. -- [#4770](https://github.com/ignite/cli/pull/4770) Add `--output-file` flag to `chain serve` command to improve running `chain serve` in the background. - -### Changes - -- [#4759](https://github.com/ignite/cli/pull/4759) Remove undocumented RPC address override in services chainer. -- [#4760](https://github.com/ignite/cli/pull/4760) Bump Cosmos SDK to `v0.53.3`. - -### Fixes - -- [#4757](https://github.com/ignite/cli/pull/4757) Always delete temp folder from open api generation. - -## [`v29.1.0`](https://github.com/ignite/cli/releases/tag/v29.1.0) - -### Features - -- [#4728](https://github.com/ignite/cli/pull/4728) Ask before overwriting a `xgenny` file. -- [#4731](https://github.com/ignite/cli/pull/4731) Complete IBC v2 wiring. -- [#4732](https://github.com/ignite/cli/pull/4732) Add `ignite chain modules list` command to list all modules in the chain. - -### Changes - -- [#4717](https://github.com/ignite/cli/pull/4717) Bump Cosmos SDK to `v0.53.2`. -- [#4718](https://github.com/ignite/cli/pull/4718) Bump default Ignite Apps. -- [#4741](https://github.com/ignite/cli/pull/4741) Let `generate openapi` generate external modules OpenAPI spec. -- [#4747](https://github.com/ignite/cli/pull/4747) Improve Ignite UI. -- [#4751](https://github.com/ignite/cli/pull/4751) Improve cache speed and limit duplicate I/O. - -### Fixes - -- [#4691](https://github.com/ignite/cli/pull/4691), [#4706](https://github.com/ignite/cli/pull/4706), [#4725](https://github.com/ignite/cli/pull/4725), [#4737](https://github.com/ignite/cli/pull/4737) Fix ts-client query template and solely Go template for `ts-client` generation. -- [#4742](https://github.com/ignite/cli/pull/4742) Updates Vue composables template for new ts-client and tanstack/vue-query v5 -- [#4744](https://github.com/ignite/cli/pull/4744) Remove `react` frontend generation via `s react` command. Use the [Ignite CCA App](https://github.com/ignite/apps) instead. - -## [`v29.0.0`](https://github.com/ignite/cli/releases/tag/v29.0.0) - -### Features - -- [#4614](https://github.com/ignite/cli/pull/4614) Improve integration tests and add query tests. -- [#4683](https://github.com/ignite/cli/pull/4683) Allow to change default denom via flag. -- [#4687](https://github.com/ignite/cli/pull/4687) Add address type with `scalar` annotations, and add `scalar` type to signer field. - -### Changes - -- [#4689](https://github.com/ignite/cli/pull/4689) Revert `HasGenesis` implementation from retracted `core` v1 to SDK `HasGenesis` interface. -- [#4701](https://github.com/ignite/cli/pull/4701) Improve `ignite doctor` by removing manual migration step. Additionally, remove protoc to buf migrations logic. -- [#4703](https://github.com/ignite/cli/pull/4703) Remove testutil.Register function. -- [#4702](https://github.com/ignite/cli/pull/4702) Improve app detection by checking for inheritance instead of interface implementation. -- [#4707](https://github.com/ignite/cli/pull/4707) Show `buf` version in `ignite version` only when in a go module. -- [#4709](https://github.com/ignite/cli/pull/4709) Remove legacy msgServer support -- [#4710](https://github.com/ignite/cli/pull/4710) Remove the `nullify` pkg from the chain `testutil` - -### Fixes - -- [#4686](https://github.com/ignite/cli/pull/4686) Filter discovered protos to only messages. -- [#4694](https://github.com/ignite/cli/issues/4694) Install an app using the `.` as a current path show a wrong app name. - -## [`v29.0.0-rc.1`](https://github.com/ignite/cli/releases/tag/v29.0.0-rc.1) - -### Features - -- [#4509](https://github.com/ignite/cli/pull/4509) Upgrade to Go 1.24. Running `ignite doctor` migrates the scaffolded `tools.go` to the tool directive in the go.mod -- [#4588](https://github.com/ignite/cli/pull/4588) Run `buf format after scaffold proto files. -- [#4603](https://github.com/ignite/cli/issues/4603) Add `GetIgniteInfo` gRPC API for apps. -- [#4657](https://github.com/ignite/cli/pull/4657) Upgrade to Cosmos SDK [v0.53.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.53.0). - - Add x/epochs module to default template (except for minimal template). - - Bump minimum compatible Cosmos SDK version to `v0.50.0`. - -### Changes - -- [#4596](https://github.com/ignite/cli/pull/4596) Add default `openapi.yml` when skipping proto gen. -- [#4601](https://github.com/ignite/cli/pull/4601) Add `appregistry` as default plugin -- [#4613](https://github.com/ignite/cli/pull/4613) Improve and simplify prompting logic by bubbletea. -- [#4624](https://github.com/ignite/cli/pull/4624) Fix autocli templates for variadics. -- [#4644](https://github.com/ignite/cli/pull/4644) Improve UI and UX for `testnet multi-node` command. -- [#4645](https://github.com/ignite/cli/pull/4645) Refactor the xast.ModifyFunction to improve the readability. -- [#3393](https://github.com/ignite/cli/issues/3393) Remove xgenny embed walker -- [#4664](https://github.com/ignite/cli/pull/4664) Add verbose flags on `scaffold` and `generate` commands. - - The flag displays the steps Ignite is taking to generate the code. - - The verbosity only applies to the command. For full verbosity use the `IGNT_DEBUG` environment variable instead. - -### Fixes - -- [#4347](https://github.com/ignite/cli/pull/4347) Fix `ts-client` generation -- [#4577](https://github.com/ignite/cli/pull/4577) Add proto version to query path. -- [#4579](https://github.com/ignite/cli/pull/4579) Fix empty params response. -- [#4585](https://github.com/ignite/cli/pull/4585) Fix faucet cmd issue. -- [#4587](https://github.com/ignite/cli/pull/4587) Add missing light clients routes to IBC client keeper. -- [#4595](https://github.com/ignite/cli/pull/4595) Fix wrong InterfaceRegistry for IBC modules. -- [#4609](https://github.com/ignite/cli/pull/4609) Add work dir for relayer integration tests. -- [#4658](https://github.com/ignite/cli/pull/4658) Fix indentation for params scaffolded into a struct. -- [#4582](https://github.com/ignite/cli/issues/4582) Fix xast misplacing comments. -- [#4660](https://github.com/ignite/cli/pull/4660) Fix xast test case indentation. -- [#4667](https://github.com/ignite/cli/pull/4667) Harden `IsSlice` - -## [`v29.0.0-beta.1`](https://github.com/ignite/cli/releases/tag/v29.0.0-beta.1) - -### Features - -- [#3707](https://github.com/ignite/cli/pull/3707) and [#4094](https://github.com/ignite/cli/pull/4094) Add collections support. -- [#3977](https://github.com/ignite/cli/pull/3977) Add `chain lint` command to lint the chain's codebase using `golangci-lint` -- [#3770](https://github.com/ignite/cli/pull/3770) Add `scaffold configs` and `scaffold params` commands -- [#4001](https://github.com/ignite/cli/pull/4001) Improve `xgenny` dry run -- [#3967](https://github.com/ignite/cli/issues/3967) Add HD wallet parameters `address index` and `account number` to the chain account config -- [#4004](https://github.com/ignite/cli/pull/4004) Remove all import placeholders using the `xast` pkg -- [#4071](https://github.com/ignite/cli/pull/4071) Support custom proto path -- [#3718](https://github.com/ignite/cli/pull/3718) Add `gen-mig-diffs` tool app to compare scaffold output of two versions of ignite -- [#4100](https://github.com/ignite/cli/pull/4100) Set the `proto-dir` flag only for the `scaffold chain` command and use the proto path from the config -- [#4111](https://github.com/ignite/cli/pull/4111) Remove vuex generation -- [#4113](https://github.com/ignite/cli/pull/4113) Generate chain config documentation automatically -- [#4131](https://github.com/ignite/cli/pull/4131) Support `bytes` as data type in the `scaffold` commands -- [#4300](https://github.com/ignite/cli/pull/4300) Only panics the module in the most top function level -- [#4327](https://github.com/ignite/cli/pull/4327) Use the TxConfig from simState instead create a new one -- [#4326](https://github.com/ignite/cli/pull/4326) Add `buf.build` version to `ignite version` command -- [#4436](https://github.com/ignite/cli/pull/4436) Return tx hash to the faucet API -- [#4437](https://github.com/ignite/cli/pull/4437) Remove module placeholders -- [#4289](https://github.com/ignite/cli/pull/4289), [#4423](https://github.com/ignite/cli/pull/4423), [#4432](https://github.com/ignite/cli/pull/4432), [#4507](https://github.com/ignite/cli/pull/4507), [#4524](https://github.com/ignite/cli/pull/4524) Cosmos SDK v0.52 support and downgrade back to 0.50, while keeping latest improvements. -- [#4480](https://github.com/ignite/cli/pull/4480) Add field max length -- [#4477](https://github.com/ignite/cli/pull/4477), [#4559](https://github.com/ignite/cli/pull/4559) IBC v10 support -- [#4166](https://github.com/ignite/cli/issues/4166) Migrate buf config files to v2 -- [#4494](https://github.com/ignite/cli/pull/4494) Automatic migrate the buf configs to v2 - -### Changes - -- [#4094](https://github.com/ignite/cli/pull/4094) Scaffolding a multi-index map using `ignite s map foo bar baz --index foobar,foobaz` is no longer supported. Use one index instead of use `collections.IndexedMap`. -- [#4058](https://github.com/ignite/cli/pull/4058) Simplify scaffolded modules by including `ValidateBasic()` logic in message handler. -- [#4058](https://github.com/ignite/cli/pull/4058) Use `address.Codec` instead of `AccAddressFromBech32`. -- [#3993](https://github.com/ignite/cli/pull/3993) Oracle scaffolding was deprecated and has been removed -- [#3962](https://github.com/ignite/cli/pull/3962) Rename all RPC endpoints and autocli commands generated for `map`/`list`/`single` types -- [#3976](https://github.com/ignite/cli/pull/3976) Remove error checks for Cobra command value get calls -- [#4002](https://github.com/ignite/cli/pull/4002) Bump buf build -- [#4008](https://github.com/ignite/cli/pull/4008) Rename `pkg/yaml` to `pkg/xyaml` -- [#4075](https://github.com/ignite/cli/pull/4075) Use `gopkg.in/yaml.v3` instead `gopkg.in/yaml.v2` -- [#4118](https://github.com/ignite/cli/pull/4118) Version scaffolded protos as `v1` to follow SDK structure. -- [#4167](https://github.com/ignite/cli/pull/4167) Scaffold `int64` instead of `int32` when a field type is `int` -- [#4159](https://github.com/ignite/cli/pull/4159) Enable gci linter -- [#4160](https://github.com/ignite/cli/pull/4160) Enable copyloopvar linter -- [#4162](https://github.com/ignite/cli/pull/4162) Enable errcheck linter -- [#4189](https://github.com/ignite/cli/pull/4189) Deprecate `ignite node` for `ignite connect` app -- [#4290](https://github.com/ignite/cli/pull/4290) Remove ignite ics logic from ignite cli (this functionality will be in the `consumer` app) -- [#4295](https://github.com/ignite/cli/pull/4295) Stop scaffolding `pulsar` files -- [#4317](https://github.com/ignite/cli/pull/4317) Remove xchisel dependency -- [#4361](https://github.com/ignite/cli/pull/4361) Remove unused `KeyPrefix` method -- [#4384](https://github.com/ignite/cli/pull/4384) Compare genesis params into chain genesis tests -- [#4463](https://github.com/ignite/cli/pull/4463) Run `chain simulation` with any simulation test case -- [#4533](https://github.com/ignite/cli/pull/4533) Promote GitHub codespace instead of Gitpod -- [#4549](https://github.com/ignite/cli/pull/4549) Remove unused placeholder vars -- [#4557](https://github.com/ignite/cli/pull/4557) Remove github.com/gookit/color - -### Fixes +## [`v28.11.1`](https://github.com/ignite/cli/releases/tag/v28.11.1) -- [#4000](https://github.com/ignite/cli/pull/4000) Run all dry runners before the wet run in the `xgenny` pkg -- [#4091](https://github.com/ignite/cli/pull/4091) Fix race conditions in the plugin logic -- [#4128](https://github.com/ignite/cli/pull/4128) Check for duplicate proto fields in config -- [#4402](https://github.com/ignite/cli/pull/4402) Fix gentx parser into the cosmosutil package -- [#4552](https://github.com/ignite/cli/pull/4552) Avoid direct access to proto field `perms.Account` and `perms.Permissions` -- [#4555](https://github.com/ignite/cli/pull/4555) Fix buf lint issues into the chain code +- [#4813](https://github.com/ignite/cli/pull/4813) Fetch fallback buf token. +- [#4813](https://github.com/ignite/cli/pull/4813) Disable Sentry for v28. v29 is the best supported version. ## [`v28.11.0`](https://github.com/ignite/cli/releases/tag/v28.11.0) diff --git a/ignite/cmd/bubblemodel/chain_serve.go b/ignite/cmd/bubblemodel/chain_serve.go index 83994a9e58..f8b4d2e5f5 100644 --- a/ignite/cmd/bubblemodel/chain_serve.go +++ b/ignite/cmd/bubblemodel/chain_serve.go @@ -7,19 +7,11 @@ import ( tea "github.com/charmbracelet/bubbletea" -<<<<<<< HEAD - "github.com/ignite/cli/v28/ignite/pkg/announcements" + "github.com/ignite/cli/v28/ignite/internal/announcements" "github.com/ignite/cli/v28/ignite/pkg/cliui/colors" "github.com/ignite/cli/v28/ignite/pkg/cliui/icons" cliuimodel "github.com/ignite/cli/v28/ignite/pkg/cliui/model" "github.com/ignite/cli/v28/ignite/pkg/events" -======= - "github.com/ignite/cli/v29/ignite/internal/announcements" - "github.com/ignite/cli/v29/ignite/pkg/cliui/colors" - "github.com/ignite/cli/v29/ignite/pkg/cliui/icons" - cliuimodel "github.com/ignite/cli/v29/ignite/pkg/cliui/model" - "github.com/ignite/cli/v29/ignite/pkg/events" ->>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) ) const ( diff --git a/ignite/cmd/cmd.go b/ignite/cmd/cmd.go index 0903effdf4..8d04c2c00e 100644 --- a/ignite/cmd/cmd.go +++ b/ignite/cmd/cmd.go @@ -12,9 +12,8 @@ import ( "github.com/spf13/cobra" flag "github.com/spf13/pflag" -<<<<<<< HEAD "github.com/ignite/cli/v28/ignite/config" - "github.com/ignite/cli/v28/ignite/pkg/announcements" + "github.com/ignite/cli/v28/ignite/internal/announcements" "github.com/ignite/cli/v28/ignite/pkg/cache" "github.com/ignite/cli/v28/ignite/pkg/cliui" uilog "github.com/ignite/cli/v28/ignite/pkg/cliui/log" @@ -23,26 +22,6 @@ import ( "github.com/ignite/cli/v28/ignite/pkg/gitpod" "github.com/ignite/cli/v28/ignite/pkg/goenv" "github.com/ignite/cli/v28/ignite/version" -======= - "github.com/ignite/cli/v29/ignite/config" - chainconfig "github.com/ignite/cli/v29/ignite/config/chain" - "github.com/ignite/cli/v29/ignite/internal/announcements" - "github.com/ignite/cli/v29/ignite/pkg/cache" - "github.com/ignite/cli/v29/ignite/pkg/cliui" - uilog "github.com/ignite/cli/v29/ignite/pkg/cliui/log" - "github.com/ignite/cli/v29/ignite/pkg/dircache" - "github.com/ignite/cli/v29/ignite/pkg/errors" - "github.com/ignite/cli/v29/ignite/pkg/goenv" - "github.com/ignite/cli/v29/ignite/pkg/gomodulepath" - "github.com/ignite/cli/v29/ignite/version" -) - -type key int - -const ( - keyChainConfig key = iota - keyChainConfigPath key = iota ->>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) ) const ( diff --git a/ignite/internal/analytics/analytics.go b/ignite/internal/analytics/analytics.go index 5bc10a5018..493927251d 100644 --- a/ignite/internal/analytics/analytics.go +++ b/ignite/internal/analytics/analytics.go @@ -12,22 +12,12 @@ import ( "github.com/manifoldco/promptui" "github.com/spf13/cobra" -<<<<<<< HEAD "github.com/ignite/cli/v28/ignite/config" + "github.com/ignite/cli/v28/ignite/internal/sentry" "github.com/ignite/cli/v28/ignite/pkg/gitpod" "github.com/ignite/cli/v28/ignite/pkg/matomo" "github.com/ignite/cli/v28/ignite/pkg/randstr" - "github.com/ignite/cli/v28/ignite/pkg/sentry" "github.com/ignite/cli/v28/ignite/version" -======= - "github.com/ignite/cli/v29/ignite/config" - "github.com/ignite/cli/v29/ignite/internal/sentry" - "github.com/ignite/cli/v29/ignite/pkg/cliui" - "github.com/ignite/cli/v29/ignite/pkg/errors" - "github.com/ignite/cli/v29/ignite/pkg/matomo" - "github.com/ignite/cli/v29/ignite/pkg/randstr" - "github.com/ignite/cli/v29/ignite/version" ->>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) ) const ( diff --git a/ignite/internal/announcements/announcement_test.go b/ignite/internal/announcements/announcement_test.go index 57ca5edc5d..407cc5df29 100644 --- a/ignite/internal/announcements/announcement_test.go +++ b/ignite/internal/announcements/announcement_test.go @@ -6,11 +6,7 @@ import ( "net/http/httptest" "testing" -<<<<<<< HEAD:ignite/pkg/announcements/announcement_test.go - "github.com/ignite/cli/v28/ignite/pkg/announcements" -======= - "github.com/ignite/cli/v29/ignite/internal/announcements" ->>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)):ignite/internal/announcements/announcement_test.go + "github.com/ignite/cli/v28/ignite/internal/announcements" ) func TestFetchAnnouncements(t *testing.T) { diff --git a/ignite/internal/buf/buf.go b/ignite/internal/buf/buf.go index 268ee2af27..c2ee5eec2d 100644 --- a/ignite/internal/buf/buf.go +++ b/ignite/internal/buf/buf.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "github.com/ignite/cli/v29/ignite/pkg/errors" + "github.com/ignite/cli/v28/ignite/pkg/errors" ) var BufTokenURL = "https://buf.ignite.com" //nolint:gosec // URL is hardcoded and not user-provided diff --git a/ignite/internal/buf/buf_test.go b/ignite/internal/buf/buf_test.go index a2f167cd6e..4488eed656 100644 --- a/ignite/internal/buf/buf_test.go +++ b/ignite/internal/buf/buf_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/ignite/cli/v29/ignite/internal/buf" + "github.com/ignite/cli/v28/ignite/internal/buf" "github.com/stretchr/testify/require" ) diff --git a/ignite/pkg/cosmosgen/generate_typescript.go b/ignite/pkg/cosmosgen/generate_typescript.go index 0acc3cdf2d..0e94eb1109 100644 --- a/ignite/pkg/cosmosgen/generate_typescript.go +++ b/ignite/pkg/cosmosgen/generate_typescript.go @@ -7,37 +7,18 @@ import ( "sort" "strings" - "golang.org/x/sync/errgroup" - -<<<<<<< HEAD "github.com/ignite/cli/v28/ignite/pkg/cache" "github.com/ignite/cli/v28/ignite/pkg/cosmosanalysis/module" "github.com/ignite/cli/v28/ignite/pkg/cosmosbuf" "github.com/ignite/cli/v28/ignite/pkg/dirchange" "github.com/ignite/cli/v28/ignite/pkg/gomodulepath" -) - -var dirchangeCacheNamespace = "generate.typescript.dirchange" - -type tsGenerator struct { - g *generator -======= - "github.com/ignite/cli/v29/ignite/internal/buf" - "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" + "golang.org/x/sync/errgroup" ) var ( bufTokenEnvName = "BUF_TOKEN" dirchangeCacheNamespace = "generate.typescript.dirchange" - - protocGenTSProtoBin = "protoc-gen-ts_proto" - - msgBufAuth = "Note: Buf is limits remote plugin requests from unauthenticated users on 'buf.build'. Intensively using this function will get you rate limited. Authenticate with 'buf registry login' to avoid this (https://buf.build/docs/generate/auth-required)." ) const localTSProtoTmpl = `version: v1 @@ -54,13 +35,9 @@ plugins: ` type tsGenerator struct { - g *generator - tsTemplateFile string - isLocalProto bool - + g *generator // hasLocalBufToken indicates whether the user had already a local Buf token. hasLocalBufToken bool ->>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) } type generatePayload struct { @@ -69,59 +46,7 @@ type generatePayload struct { } func newTSGenerator(g *generator) *tsGenerator { -<<<<<<< HEAD - return &tsGenerator{g} -======= - tsg := &tsGenerator{g: g} - if _, err := exec.LookPath(protocGenTSProtoBin); err == nil { - tsg.isLocalProto = true - } - - if !tsg.isLocalProto { - if os.Getenv(bufTokenEnvName) == "" { - token, err := buf.FetchToken() - if err != nil { - log.Printf("No '%s' binary found in PATH, using remote buf plugin for Typescript generation. %s\n", protocGenTSProtoBin, msgBufAuth) - } else { - os.Setenv(bufTokenEnvName, token) - } - } else { - tsg.hasLocalBufToken = true - } - } - - return tsg -} - -func (g *tsGenerator) tsTemplate() (string, error) { - if !g.isLocalProto { - return g.g.tsTemplate(), nil - } - if g.tsTemplateFile != "" { - return g.tsTemplateFile, nil - } - f, err := os.CreateTemp("", "buf-gen-ts-*.yaml") - if err != nil { - return "", err - } - defer f.Close() - if _, err := f.WriteString(localTSProtoTmpl); err != nil { - return "", err - } - g.tsTemplateFile = f.Name() - return g.tsTemplateFile, nil -} - -func (g *tsGenerator) cleanup() { - if g.tsTemplateFile != "" { - os.Remove(g.tsTemplateFile) - } - - // unset ignite buf token from env - if !g.hasLocalBufToken { - os.Unsetenv(bufTokenEnvName) - } ->>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) + return &tsGenerator{g: g} } func (g *generator) tsTemplate() string { diff --git a/ignite/pkg/gocmd/gocmd.go b/ignite/pkg/gocmd/gocmd.go index 87bc3638f5..ef4ee23e40 100644 --- a/ignite/pkg/gocmd/gocmd.go +++ b/ignite/pkg/gocmd/gocmd.go @@ -168,6 +168,14 @@ func Install(ctx context.Context, path string, pkgs []string, options ...exec.Op return exec.Exec(ctx, command, append(options, exec.StepOption(step.Workdir(path)))...) } +// IsInstallError returns true if err is interpreted as a go install error. +func IsInstallError(err error) bool { + if err == nil { + return false + } + return strings.Contains(err.Error(), "no required module provides package") +} + // Get runs go get pkgs on path with options. func Get(ctx context.Context, path string, pkgs []string, options ...exec.Option) error { command := []string{ diff --git a/ignite/pkg/gocmd/gocmd_test.go b/ignite/pkg/gocmd/gocmd_test.go index 4394116a97..5178b28e3e 100644 --- a/ignite/pkg/gocmd/gocmd_test.go +++ b/ignite/pkg/gocmd/gocmd_test.go @@ -7,14 +7,18 @@ import ( "github.com/stretchr/testify/assert" -<<<<<<< HEAD "github.com/ignite/cli/v28/ignite/pkg/errors" "github.com/ignite/cli/v28/ignite/pkg/gocmd" -======= - "github.com/ignite/cli/v29/ignite/pkg/gocmd" ->>>>>>> 3919d6bb (feat(cosmosgen): fetch fallback buf token (#4805)) ) +func TestIsInstallError(t *testing.T) { + assert.False(t, gocmd.IsInstallError(errors.New("oups"))) + + err := errors.New(`error while running command go install github.com/cosmos/gogoproto/protoc-gen-gocosmos google.golang.org/protobuf/cmd/protoc-gen-go github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2: no required module provides package github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2; to add it: + go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2`) + assert.True(t, gocmd.IsInstallError(err)) +} + func TestList(t *testing.T) { wd, err := os.Getwd() assert.NoError(t, err) diff --git a/ignite/templates/app/files/proto/buf.gen.sta.yaml b/ignite/templates/app/files/proto/buf.gen.sta.yaml index adf0b0f474..4444f5e75c 100644 --- a/ignite/templates/app/files/proto/buf.gen.sta.yaml +++ b/ignite/templates/app/files/proto/buf.gen.sta.yaml @@ -1,4 +1,4 @@ -# This file is auto-generated by Ignite. You can edit +# 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 diff --git a/ignite/templates/app/files/proto/buf.gen.swagger.yaml b/ignite/templates/app/files/proto/buf.gen.swagger.yaml index 0fa8788e85..58d30d86e8 100644 --- a/ignite/templates/app/files/proto/buf.gen.swagger.yaml +++ b/ignite/templates/app/files/proto/buf.gen.swagger.yaml @@ -1,4 +1,4 @@ -# This file is auto-generated by Ignite. You can edit +# This file is auto-generated from Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.swagger.yaml diff --git a/ignite/templates/app/files/proto/buf.gen.ts.yaml b/ignite/templates/app/files/proto/buf.gen.ts.yaml index 8bf943b5c8..c484fb3ad3 100644 --- a/ignite/templates/app/files/proto/buf.gen.ts.yaml +++ b/ignite/templates/app/files/proto/buf.gen.ts.yaml @@ -1,4 +1,4 @@ -# This file is auto-generated by Ignite. You can edit +# This file is auto-generated from Ignite. You can edit # the file content but do not change the file name or path. # # buf.gen.ts.yaml From 4492838c6a1500e1ca41fcf141c5f6b418fb4dfd Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 6 Oct 2025 13:33:41 +0200 Subject: [PATCH 3/5] updates --- ignite/pkg/cosmosgen/generate_typescript.go | 33 ++++++++++++--------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/ignite/pkg/cosmosgen/generate_typescript.go b/ignite/pkg/cosmosgen/generate_typescript.go index 0e94eb1109..027e6eae7c 100644 --- a/ignite/pkg/cosmosgen/generate_typescript.go +++ b/ignite/pkg/cosmosgen/generate_typescript.go @@ -7,6 +7,7 @@ import ( "sort" "strings" + "github.com/ignite/cli/v28/ignite/internal/buf" "github.com/ignite/cli/v28/ignite/pkg/cache" "github.com/ignite/cli/v28/ignite/pkg/cosmosanalysis/module" "github.com/ignite/cli/v28/ignite/pkg/cosmosbuf" @@ -21,19 +22,6 @@ var ( dirchangeCacheNamespace = "generate.typescript.dirchange" ) -const localTSProtoTmpl = `version: v1 -plugins: - - plugin: ts_proto - out: . - opt: - - logtostderr=true - - allow_merge=true - - json_names_for_fields=false - - ts_proto_opt=snakeToCamel=true - - ts_proto_opt=esModuleInterop=true - - ts_proto_out=. -` - type tsGenerator struct { g *generator // hasLocalBufToken indicates whether the user had already a local Buf token. @@ -46,7 +34,18 @@ type generatePayload struct { } func newTSGenerator(g *generator) *tsGenerator { - return &tsGenerator{g: g} + tsg := &tsGenerator{g: g} + + if os.Getenv(bufTokenEnvName) == "" { + token, err := buf.FetchToken() + if err == nil { + os.Setenv(bufTokenEnvName, token) + } + } else { + tsg.hasLocalBufToken = true + } + + return tsg } func (g *generator) tsTemplate() string { @@ -73,6 +72,12 @@ func (g *generator) generateTS(ctx context.Context) error { }) tsg := newTSGenerator(g) + defer func() { + // unset ignite buf token from env + if !tsg.hasLocalBufToken { + os.Unsetenv(bufTokenEnvName) + } + }() if err := tsg.generateModuleTemplates(ctx); err != nil { return err } From 637fcc629d925f98472669aa6fe736e7e952992f Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 6 Oct 2025 13:34:20 +0200 Subject: [PATCH 4/5] delete --- .../app/files/{{protoDir}}/buf.gen.gogo.yaml | 24 ------------------- .../files/{{protoDir}}/buf.gen.swagger.yaml | 19 --------------- 2 files changed, 43 deletions(-) delete mode 100644 ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml delete mode 100644 ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml diff --git a/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml b/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml deleted file mode 100644 index a3b72cc944..0000000000 --- a/ignite/templates/app/files/{{protoDir}}/buf.gen.gogo.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# This file is auto-generated by Ignite. You can edit -# the file content but do not change the file name or path. -# -# buf.gen.gogo.yaml -# -version: v2 -plugins: - - local: ["go", "tool", "github.com/cosmos/gogoproto/protoc-gen-gocosmos"] - out: . - opt: - - plugins=grpc - - Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any - - Mcosmos/orm/v1/orm.proto=cosmossdk.io/orm - - Mcosmos/app/v1alpha1/module.proto=cosmossdk.io/api/cosmos/app/v1alpha1 - - local: - [ - "go", - "tool", - "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway", - ] - out: . - opt: - - logtostderr=true - - allow_colon_final_segments=true diff --git a/ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml b/ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml deleted file mode 100644 index d81685c33d..0000000000 --- a/ignite/templates/app/files/{{protoDir}}/buf.gen.swagger.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# This file is auto-generated by Ignite. You can edit -# the file content but do not change the file name or path. -# -# buf.gen.swagger.yaml -# -version: v2 -plugins: - - local: - [ - "go", - "tool", - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2", - ] - out: . - opt: - - logtostderr=true - - openapi_naming_strategy=fqn - - json_names_for_fields=false - - generate_unbound_methods=true From 095ab0d9d602e6ec4a2f17ec89b8c68f502d1c45 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 6 Oct 2025 13:35:47 +0200 Subject: [PATCH 5/5] updates --- changelog.md | 1 - 1 file changed, 1 deletion(-) diff --git a/changelog.md b/changelog.md index 612f4c7bf4..0c17fa75d0 100644 --- a/changelog.md +++ b/changelog.md @@ -5,7 +5,6 @@ ## [`v28.11.1`](https://github.com/ignite/cli/releases/tag/v28.11.1) - [#4813](https://github.com/ignite/cli/pull/4813) Fetch fallback buf token. -- [#4813](https://github.com/ignite/cli/pull/4813) Disable Sentry for v28. v29 is the best supported version. ## [`v28.11.0`](https://github.com/ignite/cli/releases/tag/v28.11.0)