Skip to content

Commit

Permalink
chore(deps): Bump Go from 1.20 to 1.22 (backport #1410) (#1411)
Browse files Browse the repository at this point in the history
* chore(deps): Bump Go from 1.20 to 1.22 (#1410)

* Bump Go from 1.20 to 1.22.4

* follow golangci-lint rule

* Change ghaction go version

* Change the go version of all docker files

* add go version to split-test-files

* Replace slice header because it's deprecated since go 1.21

* Add CHANGELOG

* Update subdirs go version

(cherry picked from commit 7ebd36f)

# Conflicts:
#	.github/workflows/check-generated.yml
#	.github/workflows/lint.yml
#	.github/workflows/release-sims.yml
#	.github/workflows/test.yml
#	CHANGELOG.md
#	go.sum
#	tools/error_doc/go.mod

* chore(deps): Bump Go from 1.20 to 1.22 (#1410)

* Bump Go from 1.20 to 1.22.4

* follow golangci-lint rule

* Change ghaction go version

* Change the go version of all docker files

* add go version to split-test-files

* Replace slice header because it's deprecated since go 1.21

* Add CHANGELOG

* Update subdirs go version

* lint

* Update golangci-lint version

* remove inactive linters

* remove generating error docs ci

---------

Co-authored-by: Jaeseung Lee <[email protected]>
  • Loading branch information
mergify[bot] and tkxkd0159 authored Jun 7, 2024
1 parent 9c2bf2d commit af1a1a1
Show file tree
Hide file tree
Showing 23 changed files with 86 additions and 62 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
steps:
- uses: actions/[email protected]
with:
go-version: '1.20'
- uses: actions/checkout@v3
go-version: '1.22'
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
with:
PATTERNS: |
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: golangci/golangci-lint-action@v6
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.51
version: v1.59
args: --timeout 10m
github-token: ${{ secrets.GITHUB_TOKEN }}
if: env.GIT_DIFF
2 changes: 1 addition & 1 deletion .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- uses: ./.github/actions/generate-swagger
- name: diff
run: git diff
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release-sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- run: |
make build
Expand All @@ -39,7 +39,7 @@ jobs:
steps:
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: install runsim
run: |
export GO111MODULE="on" && go install github.com/cosmos/tools/cmd/[email protected]
Expand All @@ -55,8 +55,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
- uses: actions/cache@v3.3.1
go-version: '1.22'
- uses: actions/cache@v4.0.2
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -75,8 +75,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
- uses: actions/cache@v3.3.1
go-version: '1.22'
- uses: actions/cache@v4.0.2
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -95,8 +95,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
- uses: actions/cache@v3.3.1
go-version: '1.22'
- uses: actions/cache@v4.0.2
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- run: make build
Expand All @@ -37,7 +37,7 @@ jobs:
steps:
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- name: Install runsim
Expand All @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- uses: technote-space/[email protected]
Expand All @@ -81,7 +81,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- uses: technote-space/[email protected]
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- uses: technote-space/[email protected]
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- uses: technote-space/[email protected]
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sims_normal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- run: make build
Expand All @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- name: Install runsim
Expand All @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- uses: actions/[email protected]
Expand All @@ -59,7 +59,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- uses: actions/[email protected]
Expand All @@ -77,7 +77,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- uses: actions/[email protected]
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- name: install tparse
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- uses: technote-space/[email protected]
id: git_diff
with:
Expand All @@ -70,7 +70,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- uses: technote-space/[email protected]
Expand All @@ -88,7 +88,10 @@ jobs:
split-test-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Create a file with all the pkgs
run: go list ./... > pkgs.txt
- name: Split pkgs into 4 files
Expand Down Expand Up @@ -122,7 +125,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- uses: technote-space/[email protected]
with:
PATTERNS: |
Expand Down Expand Up @@ -204,7 +207,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.22'
- uses: technote-space/[email protected]
with:
PATTERNS: |
Expand Down
6 changes: 0 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ linters:
- gofmt
- goconst
- goimports
- golint
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- prealloc
- scopelint
- staticcheck
- stylecheck
- typecheck
Expand All @@ -27,7 +25,6 @@ linters:
- misspell
disable:
- gocritic
- maligned
- errcheck
- interfacer
- wsl
Expand Down Expand Up @@ -63,9 +60,6 @@ issues:
linters-settings:
dogsled:
max-blank-identifiers: 3
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
nolintlint:
allow-unused: false
require-explanation: false
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Event Breaking Changes

### Build, CI
* (build, ci) [\#1410](https://github.com/Finschia/finschia-sdk/pull/1410) Bump Go from 1.20 to 1.22

### Document Updates
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys add foo
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys list
# TODO: demo connecting rest-server (or is this in server now?)
FROM golang:1.20-alpine AS build-env
FROM golang:1.22-alpine AS build-env
ARG ARCH=$ARCH

# Install minimum necessary dependencies,
Expand Down
4 changes: 2 additions & 2 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"time"

"github.com/gogo/protobuf/proto"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"google.golang.org/grpc/codes"
grpcstatus "google.golang.org/grpc/status"

abci "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

"github.com/Finschia/finschia-sdk/codec"
snapshottypes "github.com/Finschia/finschia-sdk/snapshots/types"
Expand Down Expand Up @@ -56,7 +56,7 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC
}

if app.initChainer == nil {
return
return res
}

// add block gas meter for any genesis transactions (allow infinite gas)
Expand Down
2 changes: 1 addition & 1 deletion contrib/devtools/dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM bufbuild/buf:latest as BUILDER

FROM golang:alpine
FROM golang:1.22-alpine

ENV GOLANG_PROTOBUF_VERSION=1.3.5 \
GOGO_PROTOBUF_VERSION=1.3.2 \
Expand Down
2 changes: 1 addition & 1 deletion contrib/images/simd-dlv/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-alpine AS build
FROM golang:1.22-alpine AS build
RUN apk add build-base git linux-headers libc-dev
RUN go install github.com/go-delve/delve/cmd/dlv@latest
WORKDIR /work
Expand Down
2 changes: 1 addition & 1 deletion contrib/images/simd-env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-alpine AS build
FROM golang:1.22-alpine AS build
RUN apk add build-base git linux-headers
WORKDIR /work
COPY go.mod go.sum /work/
Expand Down
2 changes: 1 addition & 1 deletion contrib/rosetta/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-alpine as build
FROM golang:1.22-alpine as build

RUN apk add --no-cache tar

Expand Down
2 changes: 1 addition & 1 deletion contrib/rosetta/rosetta-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-alpine as build
FROM golang:1.22-alpine as build

RUN apk add git gcc libc-dev --no-cache

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.20
go 1.22

module github.com/Finschia/finschia-sdk

Expand Down
Loading

0 comments on commit af1a1a1

Please sign in to comment.