Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change app.go to v2 and add AppWiring feature #3553

Merged
merged 163 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
6ec0fc8
build buf pkg
Pantani Mar 30, 2023
71ccd6c
fix go.mod
Pantani Mar 30, 2023
89ca5ae
Merge branch 'main' into feat/buf-build
Pantani Apr 6, 2023
bfcf049
Merge remote-tracking branch 'origin/main' into feat/buf-build
Pantani Apr 18, 2023
1119fd3
comment xbug pkg and bump buf versions
Pantani Apr 19, 2023
b06c098
generate proto from buf and remove protoc and plugins
Pantani Apr 20, 2023
de84c72
add proto ts and api generation
Pantani Apr 25, 2023
7f0a56e
Merge branch 'main' into feat/buf-build
Pantani Apr 25, 2023
f71b889
add changelog
Pantani Apr 25, 2023
453546c
fix proto and template path
Pantani Apr 25, 2023
f71d077
fix wrong template for ts generation
Pantani Apr 25, 2023
f95a8cf
fix api out path
Pantani Apr 25, 2023
fc68882
fix ts out path and remove unused log
Pantani Apr 25, 2023
49d1a25
fix go.mod ident and sort
Pantani Apr 25, 2023
6a32471
remove unused method
Pantani Apr 25, 2023
24b84c9
fix lint
Pantani Apr 25, 2023
069eae6
fix wrong lint comment
Pantani Apr 25, 2023
610d616
remove unused tools
Pantani Apr 25, 2023
d32f7b9
fix doctor for tools pkg
Pantani Apr 25, 2023
65feeb4
add missing tool dependency
Pantani Apr 25, 2023
69b9f8d
add missing import
Pantani Apr 25, 2023
d3fbdfa
add global protoanalysis.NewCache to buf structure
Pantani Apr 25, 2023
69d9371
fix proto module name
Pantani Apr 27, 2023
72d8e12
Merge remote-tracking branch 'origin/main' into feat/buf-build
Pantani May 5, 2023
507ed36
update go.mod
Pantani May 5, 2023
4bd764b
Update ignite/pkg/cosmosgen/generate_go.go method name
Pantani May 8, 2023
e603a26
Update ignite/pkg/buf/buf.go remove unused ctx
Pantani May 8, 2023
d6d5be0
Merge remote-tracking branch 'origin/main' into feat/buf-build
Pantani May 8, 2023
12632b0
fix wrong method call
Pantani May 8, 2023
e8d1a9a
fix deep tools
Pantani May 8, 2023
a7edd4e
fix ignite doctor
Pantani May 8, 2023
a4287f0
fix buf.gen files
Pantani May 8, 2023
279fed1
fix proto gen files
Pantani May 8, 2023
b4a432c
remove 3thrparty mod
Pantani May 12, 2023
dc1f53a
thr modules openapi
Pantani May 14, 2023
6c9f881
add xos copy commands
Pantani May 18, 2023
c70cfb3
fix wrong proto tmp path
Pantani May 19, 2023
ce4f415
remove unused method
Pantani May 19, 2023
f966825
update tools for the doctor command
Pantani May 19, 2023
e300187
Merge branch 'main' into feat/buf-build
Pantani May 19, 2023
1609b2e
unhlanded error
Pantani May 19, 2023
bd41879
check if the buf files exists
Pantani May 19, 2023
ba56501
remove unused ctx
Pantani May 19, 2023
c72b9e1
Merge branch 'main' into feat/buf-build
Pantani May 22, 2023
808d18f
Merge branch 'main' into feat/buf-build
Pantani May 22, 2023
cd0c4ce
Merge branch 'main' into feat/buf-build
Pantani May 23, 2023
80d60cb
Merge remote-tracking branch 'origin/main' into feat/buf-build
Pantani May 23, 2023
dce042f
fix changelog merge
Pantani May 23, 2023
7a1021b
fix unit tests and make more dynamic
Pantani May 25, 2023
ca27109
Merge branch 'main' into feat/buf-build
Pantani May 25, 2023
da28a09
Merge branch 'main' into feat/buf-build
Pantani May 25, 2023
8ea0dee
add support for new app.go v2
Pantani May 31, 2023
c900fa3
remove chain warnings from logs
Pantani Jun 1, 2023
01a3509
use custom buffer instead bytes.buffer
Pantani Jun 1, 2023
6c10015
Update changelog
Pantani Jun 1, 2023
fc7cb19
Merge branch 'main' into feat/buf-build
Pantani Jun 5, 2023
776dc7e
inject custom module
Pantani Jun 5, 2023
8442b5a
Merge remote-tracking branch 'origin/main' into feat/buf-build
Pantani Jun 5, 2023
2c34095
fix ts script generation and remove pulsar buf files
Pantani Jun 7, 2023
63302e4
Merge remote-tracking branch 'origin/main' into feat/app-wiring
Pantani Jun 7, 2023
86d5998
remove params from module and bump sdk and ibc
Pantani Jun 9, 2023
c5fb225
app.go v2
Pantani Jun 11, 2023
b64c930
Merge branch 'main' into feat/app-wiring
Pantani Jun 11, 2023
68a9222
add changelog
Pantani Jun 11, 2023
4d366cb
Merge remote-tracking branch 'origin/feat/buf-build' into feat/buf-ap…
Pantani Jun 13, 2023
b7c6794
Merge branch 'main' into feat/buf-build
Pantani Jun 13, 2023
23779aa
Merge branch 'main' into feat/buf-build
Pantani Jun 13, 2023
24b5722
add pulsar protobuf support
Pantani Jun 13, 2023
fbf58fb
Merge remote-tracking branch 'origin/main' into feat/app-wiring
Pantani Jun 13, 2023
3e58e71
fix changelog
Pantani Jun 13, 2023
9e598c9
Merge remote-tracking branch 'origin/feat/app-wiring' into feat/buf-a…
Pantani Jun 13, 2023
bbb41a7
fix changelog
Pantani Jun 13, 2023
ec45860
add msg update params
Pantani Jun 16, 2023
5987e4a
Merge remote-tracking branch 'origin/main' into feat/buf-app-wiring
Pantani Jun 16, 2023
16be294
update change log
Pantani Jun 16, 2023
629dea2
add custom parameters
Pantani Jun 17, 2023
6b0a34b
remove upgrade handlers
Pantani Jun 17, 2023
1a1d154
remove the keeper as a pointer
Pantani Jun 17, 2023
2c1d178
add custom parameters default keys
Pantani Jun 18, 2023
eb88671
add pulsar module config to appconfig and fix import not exist for mo…
Pantani Jun 18, 2023
b5961aa
add missing placeholder and remove unused replacer parameter
Pantani Jun 18, 2023
0f71f0a
remove unused placeholders
Pantani Jun 19, 2023
056edaf
remove unused placeholders
Pantani Jun 19, 2023
5f0ca26
add missing imports for IBC modules
Pantani Jun 19, 2023
2c96082
add ibc to app.go
Pantani Jun 21, 2023
020baea
Merge remote-tracking branch 'origin/main' into feat/buf-build
Pantani Jun 21, 2023
47e0877
fix changelog
Pantani Jun 21, 2023
d1eed93
fix ibc templates for appwiring
Pantani Jun 21, 2023
706d4e4
inject ibc keepers
Pantani Jun 21, 2023
92a8e0c
remove warning
Pantani Jun 21, 2023
fe7bf5f
ADD IBC TO GOV ROUTE KEEPER
Pantani Jun 21, 2023
592eb87
fix ibckeeper injection
Pantani Jun 22, 2023
83f14e6
fix testutil for ibc module
Pantani Jun 22, 2023
4f5af12
Merge branch 'main' into feat/buf-app-wiring
Pantani Jun 22, 2023
d03469e
update goversion
Pantani Jun 22, 2023
9532249
update lint version
Pantani Jun 22, 2023
c44876a
fix goversion
Pantani Jun 22, 2023
1fb2827
downgrade lint version
Pantani Jun 22, 2023
7cc3ddf
add pulsar to the tools file
Pantani Jun 22, 2023
fc59106
fix tests for app.go implementations
Pantani Jun 22, 2023
0d7c8fb
fix doctor command
Pantani Jun 22, 2023
b936887
update lint
Pantani Jun 22, 2023
ee62c05
use sdkerrors codes
Pantani Jun 23, 2023
114a105
use deprecated sdkerrors
Pantani Jun 23, 2023
d95e9b7
add migration for scaffold and generate commands
Pantani Jun 23, 2023
fedfd47
fix pre handler
Jun 25, 2023
3cc098c
fix rance condition
Jun 25, 2023
1fd5de5
Merge branch 'feat/buf-build' into feat/buf-app-wiring
Jun 26, 2023
e7f4627
fix wrong app path for tools migrations
Jun 26, 2023
679e930
Merge branch 'feat/buf-build' into feat/buf-app-wiring
Jun 26, 2023
0b0bd42
rollback lint version
Jun 26, 2023
775f417
fix lint
Jun 26, 2023
f28699d
rollback draft changes
Jun 26, 2023
660cc28
fix ineffassign lint
Jun 26, 2023
7722c4e
fix wrong path
Jun 26, 2023
cc60830
Merge branch 'feat/buf-build' into feat/buf-app-wiring
Jun 26, 2023
105428f
fix deprecated rand seed
Jun 26, 2023
466022d
remove unused code
Jun 26, 2023
973198a
assert simulation app name
Jun 26, 2023
49e3fb0
decrease the size of the test chain name
Jun 27, 2023
1821fc7
fix setup msg server keeper
Jun 27, 2023
3b24492
fix wrong keeper name
Jun 27, 2023
e59427b
exclude module.proto from go proto generation
Jun 27, 2023
af9876d
fix wrong keeper arg pointer
Jun 27, 2023
d855ee5
fix missing sdk import
Jun 27, 2023
04e7b65
fix wrong imports
Jun 27, 2023
7fe7cba
Merge branch 'main' into feat/buf-build
Pantani Jun 28, 2023
af24382
Merge branch 'main' into feat/buf-app-wiring
Pantani Jun 28, 2023
9a9f2c8
Merge branch 'main' into feat/buf-build
Pantani Jun 29, 2023
c423fc1
Merge branch 'main' into feat/buf-app-wiring
Pantani Jun 29, 2023
b6e53f3
fix missing import
Jun 29, 2023
383a07c
move buf pkg to cosmosbuf
Jun 29, 2023
d6d5bc0
Merge branch 'feat/buf-build' into feat/buf-app-wiring
Jun 29, 2023
a9bad12
Merge branch 'main' into feat/buf-app-wiring
Jul 3, 2023
0b98cf5
fix doctor tools test
Jul 3, 2023
3776f64
fix dependencie bank perm
Jul 3, 2023
658897e
add default expected keepers
Jul 3, 2023
8f56bf3
create generate proto-pulsar commands
Jul 3, 2023
6b8b0a0
bump ibc-go
Jul 3, 2023
d7fd56b
remove unused module
Jul 3, 2023
380b264
replace cosmossdk.io/simapp/params to github.com/cosmos/cosmos-sdk/ty…
Jul 3, 2023
3a439a9
remove unused workaround
Jul 3, 2023
ab6ccd6
fix relative path for appPath
Jul 4, 2023
81d4141
use default rand
Jul 4, 2023
38317a5
rollback checkBufFiles method
Jul 4, 2023
d28840f
set params for testutil
Jul 4, 2023
1194648
use short name for integrastion test modules
Jul 5, 2023
8e730f8
Merge branch 'main' into feat/buf-app-wiring
Pantani Jul 5, 2023
61a3adb
change slashing keep interface to avoid conflict with the staking keeper
Jul 5, 2023
3a6bc92
fix tx module name for intagration tests
Jul 5, 2023
1617728
remove some typos
Jul 5, 2023
df52d0d
update buf version
Jul 5, 2023
6819b22
exclude module.proto file to generate ts
Jul 5, 2023
d22049b
Merge remote-tracking branch 'origin/main' into feat/buf-app-wiring
Jul 18, 2023
ae1cbce
Merge branch 'main' into feat/buf-app-wiring
Pantani Jul 19, 2023
6b62ade
Merge branch 'main' into feat/buf-app-wiring
Pantani Jul 19, 2023
82e87ee
Merge branch 'main' into feat/buf-app-wiring
Pantani Jul 20, 2023
0243c16
Merge remote-tracking branch 'origin/main' into feat/buf-app-wiring
Jul 26, 2023
aedecd5
Merge remote-tracking branch 'origin/main' into feat/buf-app-wiring
Jul 26, 2023
1cbfc32
Merge remote-tracking branch 'origin/main' into feat/buf-app-wiring
Aug 3, 2023
6700846
refactor: validate SDK version and deprecate `sdkerrors.Wrap` (#3602)
jeronimoalbi Aug 4, 2023
6b8b6b5
Merge branch 'main' into feat/buf-app-wiring
Pantani Aug 9, 2023
70fa63a
Merge branch 'main' into feat/buf-app-wiring
jeronimoalbi Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gen-docs-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'

- name: Generate CLI Docs
run: ./scripts/gen-cli-docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'

- name: Run make format
run: make format
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'

- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/setup-go@v4
if: env.GIT_DIFF
with:
go-version: 1.19
go-version: '1.20'
- name: Run Integration Tests
if: env.GIT_DIFF
run: GOSUMDB=off go test -v -timeout 120m ./integration/${{ matrix.test-path }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/setup-go@v4
if: env.GIT_DIFF
with:
go-version: 1.19
go-version: '1.20'
cache: true
cache-dependency-path: go.sum

Expand Down
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM gitpod/workspace-full

# Go
ENV GO_VERSION=1.19.3
ENV GO_VERSION=1.20.5
ENV GOPATH=$HOME/go-packages
ENV GOROOT=$HOME/go
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## prep the base image.
#
FROM golang:1.19 as base
FROM golang:1.20 as base

RUN apt update && \
apt-get install -y \
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
### Features

- [#3476](https://github.com/ignite/cli/pull/3476) Use `buf.build` binary to code generate from proto files
- [#3536](https://github.com/ignite/cli/pull/3536) Change app.go to v2 and add AppWiring feature

### Changes

- [#3559](https://github.com/ignite/cli/pull/3559) Bump network plugin version to `v0.1.1`

### Changes

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/03-clients/01-go-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ To import dependencies for your package, you can add the following code to the
```text title="blogclient/go.mod"
module blogclient

go 1.19
go 1.20

require (
blog v0.0.0-00010101000000-000000000000
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/03-clients/03-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ properly interact with a Cosmos chain. The address prefix is used to identify
the chain that the app is connected to, and must match the prefix used by the
chain.

By default, Ignite creates a chain with the the `cosmos` prefix. If you have
By default, Ignite creates a chain with the `cosmos` prefix. If you have
created your chain with `ignite scaffold chain ... --adddress-prefix foo` or
manually changed the prefix in the source code of the chain, you need to set the
prefix in the Vue app.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/04-network/02-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ anyone can be a coordinator or a validator.

## Launching a chain on Ignite

Launching with the CLI can be as simple as a few short commands with the the CLI using `ignite network` command
Launching with the CLI can be as simple as a few short commands with the CLI using `ignite network` command
namespace.

> **NOTE:** `ignite n` can also be used as a shortcut for `ignite network`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ In the newly scaffolded `x/blog/keeper/msg_server_create_comment.go` file, you c
You need to do the following things:

* Create a variable of type `Comment` with title and body from the message
* Check if the the comment posted for the respective blog id exists and comment is not older than 100 blocks
* Check if the comment posted for the respective blog id exists and comment is not older than 100 blocks
* Append this `Comment` to the store

```go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (k msgServer) RevealSolution(goCtx context.Context, msg *types.MsgRevealSol
// convert the hash to a string
var solutionScavengerHashString = hex.EncodeToString(solutionScavengerHash[:])

// try getting a commit using the the hash of solution and address
// try getting a commit using the hash of solution and address
_, isFound := k.GetCommit(ctx, solutionScavengerHashString)

// return an error if a commit doesn't exist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To launch a Cosmos blockchain you need someone to be a coordinator and others to

## Launching a chain on Ignite

Launching with the CLI can be as simple as a few short commands with the the CLI using `ignite network` command namespace.
Launching with the CLI can be as simple as a few short commands with the CLI using `ignite network` command namespace.

> **NOTE:** `ignite n` can also be used as a shortcut for `ignite network`.

Expand Down
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-v0.26.1/03-clients/03-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ properly interact with a Cosmos chain. The address prefix is used to identify
the chain that the app is connected to, and must match the prefix used by the
chain.

By default, Ignite creates a chain with the the `cosmos` prefix. If you have
By default, Ignite creates a chain with the `cosmos` prefix. If you have
created your chain with `ignite scaffold chain ... --adddress-prefix foo` or
manually changed the prefix in the source code of the chain, you need to set the
prefix in the Vue app.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ anyone can be a coordinator or a validator.

## Launching a chain on Ignite

Launching with the CLI can be as simple as a few short commands with the the CLI using `ignite network` command
Launching with the CLI can be as simple as a few short commands with the CLI using `ignite network` command
namespace.

> **NOTE:** `ignite n` can also be used as a shortcut for `ignite network`.
Expand Down
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-v0.27.1/03-clients/03-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ properly interact with a Cosmos chain. The address prefix is used to identify
the chain that the app is connected to, and must match the prefix used by the
chain.

By default, Ignite creates a chain with the the `cosmos` prefix. If you have
By default, Ignite creates a chain with the `cosmos` prefix. If you have
created your chain with `ignite scaffold chain ... --adddress-prefix foo` or
manually changed the prefix in the source code of the chain, you need to set the
prefix in the Vue app.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ anyone can be a coordinator or a validator.

## Launching a chain on Ignite

Launching with the CLI can be as simple as a few short commands with the the CLI using `ignite network` command
Launching with the CLI can be as simple as a few short commands with the CLI using `ignite network` command
namespace.

> **NOTE:** `ignite n` can also be used as a shortcut for `ignite network`.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ignite/cli

go 1.19
go 1.20

require (
cosmossdk.io/math v1.0.1
Expand Down
1 change: 1 addition & 0 deletions ignite/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
flagSetPath(c)
flagSetClearCache(c)
c.AddCommand(NewGenerateGo())
c.AddCommand(NewGeneratePulsar())

Check warning on line 28 in ignite/cmd/generate.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/generate.go#L28

Added line #L28 was not covered by tests
c.AddCommand(NewGenerateTSClient())
c.AddCommand(NewGenerateVuex())
c.AddCommand(NewGenerateComposables())
Expand Down
47 changes: 47 additions & 0 deletions ignite/cmd/generate_pulsar.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package ignitecmd

import (
"github.com/spf13/cobra"

"github.com/ignite/cli/ignite/pkg/cliui"
"github.com/ignite/cli/ignite/pkg/cliui/icons"
"github.com/ignite/cli/ignite/services/chain"
)

func NewGeneratePulsar() *cobra.Command {
c := &cobra.Command{
Use: "proto-pulsar",
Short: "Compile protocol buffer files to Go pulsar source code required by Cosmos SDK",
RunE: generatePulsarHandler,
}

c.Flags().AddFlagSet(flagSetYes())

return c

Check warning on line 20 in ignite/cmd/generate_pulsar.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/generate_pulsar.go#L11-L20

Added lines #L11 - L20 were not covered by tests
}

func generatePulsarHandler(cmd *cobra.Command, _ []string) error {
session := cliui.New(cliui.StartSpinnerWithText(statusGenerating))
defer session.End()

c, err := newChainWithHomeFlags(
cmd,
chain.WithOutputer(session),
chain.CollectEvents(session.EventBus()),
chain.CheckCosmosSDKVersion(),
)
if err != nil {
return err
}

Check warning on line 35 in ignite/cmd/generate_pulsar.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/generate_pulsar.go#L23-L35

Added lines #L23 - L35 were not covered by tests

cacheStorage, err := newCache(cmd)
if err != nil {
return err
}

Check warning on line 40 in ignite/cmd/generate_pulsar.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/generate_pulsar.go#L37-L40

Added lines #L37 - L40 were not covered by tests

if err := c.Generate(cmd.Context(), cacheStorage, chain.GeneratePulsar()); err != nil {
return err
}

Check warning on line 44 in ignite/cmd/generate_pulsar.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/generate_pulsar.go#L42-L44

Added lines #L42 - L44 were not covered by tests

return session.Println(icons.OK, "Generated Go pulsar code")

Check warning on line 46 in ignite/cmd/generate_pulsar.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/generate_pulsar.go#L46

Added line #L46 was not covered by tests
}
11 changes: 11 additions & 0 deletions ignite/cmd/scaffold.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
flag "github.com/spf13/pflag"

"github.com/ignite/cli/ignite/pkg/cliui"
"github.com/ignite/cli/ignite/pkg/cosmosver"
"github.com/ignite/cli/ignite/pkg/gomodulepath"
"github.com/ignite/cli/ignite/pkg/placeholder"
"github.com/ignite/cli/ignite/pkg/xgit"
"github.com/ignite/cli/ignite/services/scaffolder"
"github.com/ignite/cli/ignite/version"
)

// flags related to component scaffolding.
Expand Down Expand Up @@ -129,6 +131,15 @@
return err
}

ver, err := cosmosver.Detect(appPath)
if err != nil {
return err
}

Check warning on line 137 in ignite/cmd/scaffold.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/scaffold.go#L134-L137

Added lines #L134 - L137 were not covered by tests

if err := version.AssertSupportedCosmosSDKVersion(ver); err != nil {
return err
}

Check warning on line 141 in ignite/cmd/scaffold.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/scaffold.go#L139-L141

Added lines #L139 - L141 were not covered by tests

if err := toolsMigrationPreRunHandler(cmd, session, appPath); err != nil {
return err
}
Expand Down
12 changes: 12 additions & 0 deletions ignite/cmd/scaffold_chain.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package ignitecmd

import (
"errors"

"github.com/spf13/cobra"

"github.com/ignite/cli/ignite/pkg/cliui"
Expand Down Expand Up @@ -77,6 +79,7 @@
c.Flags().AddFlagSet(flagSetAccountPrefixes())
c.Flags().StringP(flagPath, "p", "", "create a project in a specific path")
c.Flags().Bool(flagNoDefaultModule, false, "create a project without a default module")
c.Flags().StringSlice(flagParams, []string{}, "add default module parameters")

Check warning on line 82 in ignite/cmd/scaffold_chain.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/scaffold_chain.go#L82

Added line #L82 was not covered by tests
c.Flags().Bool(flagSkipGit, false, "skip Git repository initialization")

return c
Expand All @@ -94,6 +97,14 @@
skipGit, _ = cmd.Flags().GetBool(flagSkipGit)
)

params, err := cmd.Flags().GetStringSlice(flagParams)
if err != nil {
return err
}
if noDefaultModule && len(params) > 0 {
return errors.New("params flag is only supported if the default module is enabled")
}

Check warning on line 106 in ignite/cmd/scaffold_chain.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/scaffold_chain.go#L100-L106

Added lines #L100 - L106 were not covered by tests

cacheStorage, err := newCache(cmd)
if err != nil {
return err
Expand All @@ -108,6 +119,7 @@
addressPrefix,
noDefaultModule,
skipGit,
params,

Check warning on line 122 in ignite/cmd/scaffold_chain.go

View check run for this annotation

Codecov / codecov/patch

ignite/cmd/scaffold_chain.go#L122

Added line #L122 was not covered by tests
)
if err != nil {
return err
Expand Down
56 changes: 0 additions & 56 deletions ignite/cmd/scaffold_mwasm.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/ignite/example

go 1.19
go 1.20
2 changes: 0 additions & 2 deletions ignite/pkg/availableport/availableport.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"math/rand"
"net"
"time"
)

// Find finds n number of unused ports.
Expand All @@ -16,7 +15,6 @@ func Find(n int) (ports []int, err error) {

for i := 0; i < n; i++ {
for {
rand.Seed(time.Now().UnixNano())
port := rand.Intn(max-min+1) + min

conn, err := net.Dial("tcp", fmt.Sprintf(":%d", port))
Expand Down
Loading
Loading