From b17c134db01dfe128dbb12bdd6ce0d3dcf7d5954 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Wed, 24 Jan 2024 14:50:13 +0100 Subject: [PATCH 1/2] refactor(cosmover): delete notion of app version --- ignite/cmd/chain_build.go | 3 +-- ignite/cmd/chain_init.go | 3 +-- ignite/cmd/chain_serve.go | 3 +-- ignite/pkg/cosmosanalysis/app/app_test.go | 8 ++++---- .../app/testdata/{app_v2.go => app_di.go} | 2 +- ignite/pkg/cosmosver/app.go | 19 ------------------- 6 files changed, 8 insertions(+), 30 deletions(-) rename ignite/pkg/cosmosanalysis/app/testdata/{app_v2.go => app_di.go} (99%) delete mode 100644 ignite/pkg/cosmosver/app.go diff --git a/ignite/cmd/chain_build.go b/ignite/cmd/chain_build.go index 47ab548c07..659d0bb525 100644 --- a/ignite/cmd/chain_build.go +++ b/ignite/cmd/chain_build.go @@ -9,7 +9,6 @@ import ( "github.com/ignite/cli/v28/ignite/pkg/chaincmd" "github.com/ignite/cli/v28/ignite/pkg/cliui" "github.com/ignite/cli/v28/ignite/pkg/cliui/colors" - "github.com/ignite/cli/v28/ignite/pkg/cosmosver" "github.com/ignite/cli/v28/ignite/services/chain" ) @@ -91,7 +90,7 @@ for your current environment. c.Flags().AddFlagSet(flagSetDebug()) c.Flags().Bool(flagRelease, false, "build for a release") c.Flags().StringSliceP(flagReleaseTargets, "t", []string{}, "release targets. Available only with --release flag") - c.Flags().StringSlice(flagBuildTags, []string{cosmosver.DefaultVersion().String()}, "parameters to build the chain binary") + c.Flags().StringSlice(flagBuildTags, []string{}, "parameters to build the chain binary") c.Flags().String(flagReleasePrefix, "", "tarball prefix for each release target. Available only with --release flag") c.Flags().StringP(flagOutput, "o", "", "binary output path") c.Flags().BoolP("verbose", "v", false, "verbose output") diff --git a/ignite/cmd/chain_init.go b/ignite/cmd/chain_init.go index 8b49729815..014a1cfcc4 100644 --- a/ignite/cmd/chain_init.go +++ b/ignite/cmd/chain_init.go @@ -6,7 +6,6 @@ import ( "github.com/ignite/cli/v28/ignite/pkg/chaincmd" "github.com/ignite/cli/v28/ignite/pkg/cliui" "github.com/ignite/cli/v28/ignite/pkg/cliui/colors" - "github.com/ignite/cli/v28/ignite/pkg/cosmosver" "github.com/ignite/cli/v28/ignite/services/chain" ) @@ -89,7 +88,7 @@ commands manually to ensure a production-level node initialization. c.Flags().AddFlagSet(flagSetCheckDependencies()) c.Flags().AddFlagSet(flagSetSkipProto()) c.Flags().AddFlagSet(flagSetDebug()) - c.Flags().StringSlice(flagBuildTags, []string{cosmosver.DefaultVersion().String()}, "parameters to build the chain binary") + c.Flags().StringSlice(flagBuildTags, []string{}, "parameters to build the chain binary") return c } diff --git a/ignite/cmd/chain_serve.go b/ignite/cmd/chain_serve.go index 8404c641d1..582d3ff741 100644 --- a/ignite/cmd/chain_serve.go +++ b/ignite/cmd/chain_serve.go @@ -10,7 +10,6 @@ import ( "github.com/ignite/cli/v28/ignite/pkg/cliui" uilog "github.com/ignite/cli/v28/ignite/pkg/cliui/log" cliuimodel "github.com/ignite/cli/v28/ignite/pkg/cliui/model" - "github.com/ignite/cli/v28/ignite/pkg/cosmosver" "github.com/ignite/cli/v28/ignite/pkg/errors" "github.com/ignite/cli/v28/ignite/pkg/events" "github.com/ignite/cli/v28/ignite/services/chain" @@ -76,7 +75,7 @@ production, you may want to run "appd start" manually. c.Flags().BoolP(flagResetOnce, "r", false, "reset the app state once on init") c.Flags().Bool(flagGenerateClients, false, "generate code for the configured clients on reset or source code change") c.Flags().Bool(flagQuitOnFail, false, "quit program if the app fails to start") - c.Flags().StringSlice(flagBuildTags, []string{cosmosver.DefaultVersion().String()}, "parameters to build the chain binary") + c.Flags().StringSlice(flagBuildTags, []string{}, "parameters to build the chain binary") return c } diff --git a/ignite/pkg/cosmosanalysis/app/app_test.go b/ignite/pkg/cosmosanalysis/app/app_test.go index 3638950b0e..6498e76a9d 100644 --- a/ignite/pkg/cosmosanalysis/app/app_test.go +++ b/ignite/pkg/cosmosanalysis/app/app_test.go @@ -21,8 +21,8 @@ var ( NoAppFile []byte //go:embed testdata/two_app.go TwoAppFile []byte - //go:embed testdata/app_v2.go - AppV2 []byte + //go:embed testdata/app_di.go + AppDepinject []byte ) func TestCheckKeeper(t *testing.T) { @@ -55,8 +55,8 @@ func TestCheckKeeper(t *testing.T) { expectedError: "app.go should contain a single app (got 2)", }, { - name: "app v2", - appFile: AppV2, + name: "app depinject", + appFile: AppDepinject, keeperName: "FooKeeper", }, } diff --git a/ignite/pkg/cosmosanalysis/app/testdata/app_v2.go b/ignite/pkg/cosmosanalysis/app/testdata/app_di.go similarity index 99% rename from ignite/pkg/cosmosanalysis/app/testdata/app_v2.go rename to ignite/pkg/cosmosanalysis/app/testdata/app_di.go index ef9b9b78d1..180dbcf513 100644 --- a/ignite/pkg/cosmosanalysis/app/testdata/app_v2.go +++ b/ignite/pkg/cosmosanalysis/app/testdata/app_di.go @@ -1,4 +1,4 @@ -//go:build !app_v1 +//go:build !hack-to-no-include-deps-in-ignite package simapp diff --git a/ignite/pkg/cosmosver/app.go b/ignite/pkg/cosmosver/app.go deleted file mode 100644 index b3dec43efb..0000000000 --- a/ignite/pkg/cosmosver/app.go +++ /dev/null @@ -1,19 +0,0 @@ -package cosmosver - -type AppVersion string - -const ( - AppV1 AppVersion = "app_v1" - AppV2 AppVersion = "app_v2" -) - -// DefaultVersion returns the default app version for build. -// TODO change the default value after update the version. -func DefaultVersion() AppVersion { - return AppV1 -} - -// String returns the string value. -func (v AppVersion) String() string { - return string(v) -} From a626865eca018ad5992513920cc80c95e8a2cef8 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Wed, 24 Jan 2024 14:53:00 +0100 Subject: [PATCH 2/2] add changelog --- changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index 4a8038d7bf..afa01e67fd 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,10 @@ - [#3835](https://github.com/ignite/cli/pull/3835) Add `--minimal` flag to `scaffold chain` to scaffold a chain with the least amount of sdk modules +### Changes + +- [#3903](https://github.com/ignite/cli/pull/3903) Do not specify a default build tag and deprecate notion of app version + ## [`v28.1.1`](https://github.com/ignite/cli/releases/tag/v28.1.1) ### Fixes