Skip to content

Commit

Permalink
bulid: update golang version to 1.20 (#60)
Browse files Browse the repository at this point in the history
* Update golang version to 1.20

* Fix golangci versions

* Lint

* Update CHANGELOG.md
  • Loading branch information
0Tech committed Jul 24, 2023
1 parent 881c77f commit 164efa4
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/setup-go@v3.5.0
with:
go-version: 1.18
go-version: '1.20'
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
Expand All @@ -23,10 +23,10 @@ jobs:
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@master
- uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.50.1
version: v1.51
args: --timeout 10m
github-token: ${{ secrets.GITHUB_TOKEN }}
if: env.GIT_DIFF
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3.5.0
with:
go-version: 1.18
go-version: '1.20'
- name: Display go version
run: go version
- name: Check if difference
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3.5.0
with:
go-version: 1.18
go-version: '1.20'
- name: Display go version
run: go version
- name: Check if difference
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3.5.0
with:
go-version: 1.18
go-version: '1.20'
- name: Display go version
run: go version
- name: Check if difference
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
### Breaking Changes

### Build, CI
* [\#60](https://github.com/Finschia/wasmd/pull/60) Update golang version to 1.20

### Document Updates
* [\#54](https://github.com/Finschia/wasmd/pull/54) add documentation about errors (codespace and codes)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Please don't make Pull Requests from `main`.

## Dependencies

We use [Go 1.18 Modules](https://github.com/golang/go/wiki/Modules) to manage
We use [Go 1.20 Modules](https://github.com/golang/go/wiki/Modules) to manage
dependency versions.

The `main` branch of every repository should just build with `go get`,
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker build . -t finschia/wasmd:latest
# docker run --rm -it finschia/wasmd:latest /bin/sh
FROM golang:1.18-alpine3.15 AS go-builder
FROM golang:1.20-alpine AS go-builder
ARG arch=x86_64

# this comes from standard alpine nightly file
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ from the `cosmos/gaia` repository, and then we change `x/wasm`.
However, the `wasmd` binary should function just like `gaiad` except for the
addition of the `x/wasm` module.

**Note**: Requires [Go 1.18+](https://golang.org/dl/)
**Note**: Requires [Go 1.20+](https://golang.org/dl/)

For critical security issues & disclosure, see [SECURITY.md](SECURITY.md).
## Compatibility with CosmWasm contracts
Expand Down
2 changes: 1 addition & 1 deletion contrib/prototools-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN GO111MODULE=on go get \

RUN upx --lzma /usr/local/bin/*

FROM golang:1.18-alpine
FROM golang:1.20-alpine
ENV LD_LIBRARY_PATH=/lib64:/lib

WORKDIR /work
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/Finschia/wasmd

go 1.18
go 1.20

require (
github.com/Finschia/finschia-sdk v0.47.0-rc6
Expand Down
3 changes: 2 additions & 1 deletion x/wasm/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ var (
ErrInvalidEvent = sdkErrors.Register(DefaultCodespace, 21, "invalid event")

// error if an address does not belong to a contract (just for registration)
_ = sdkErrors.Register(DefaultCodespace, 22, "no such contract")
// CosmWasm/wasmd#1161 would update this line.
_ = sdkErrors.Register(DefaultCodespace, 22, "no such contract") //nolint:errcheck

// ErrNotAJSONObject error if given data is not a JSON object
ErrNotAJSONObject = sdkErrors.Register(DefaultCodespace, 23, "not a JSON object")
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/types/test_fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func GenesisFixture(mutators ...func(*GenesisState)) GenesisState {

func randBytes(n int) []byte {
r := make([]byte, n)
rand.Read(r)
rand.Read(r) //nolint:staticcheck
return r
}

Expand Down

0 comments on commit 164efa4

Please sign in to comment.