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(go): bump go 1.20 to 1.21 #1654

Merged
merged 6 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
13 changes: 1 addition & 12 deletions .github/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,6 @@ linters-settings:
- opinionated
- performance
- style
gomodguard:
blocked:
modules:
- log/slog:
recommendations:
- golang.org/x/exp
reason: "the minimum go version for the monorepo is 1.20"
versions:
- go.uber.org/zap/exp:
version: "> 0.1.0"
reason: "this version of zap/exp is a requirement until we upgrade to go 1.21 (https://github.com/uber-go/zap/blob/master/exp/CHANGELOG.md)"

issues:
whole-files: true
Expand All @@ -86,4 +75,4 @@ issues:
- goconst # Disabled linting of common mnemonics and test case strings
- path: _\.gno
linters:
- errorlint # Disabled linting of error comparisons, because of lacking std lib support
- errorlint # Disabled linting of error comparisons, because of lacking std lib support
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 1
- uses: actions/setup-go@v4
with:
go-version: "1.21.x"
go-version: "1.22.x"
- name: "gobenchdata publish: ${{ inputs.publish }}"
run: go run go.bobheadxi.dev/gobenchdata@v1 action
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contribs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
goversion: # two latest versions
- "1.21.x"
- "1.22.x"
program:
- "gnomd"
- "gnodev"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/db-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.20.x"
- "1.21.x"
- "1.22.x"
tags:
- cleveldb
- memdb
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Tidy all Go mods
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.20.x"
- "1.21.x"
- "1.22.x"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand All @@ -38,8 +38,8 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.20.x"
- "1.21.x"
- "1.22.x"
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 30
Expand All @@ -63,8 +63,8 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.20.x"
- "1.21.x"
- "1.22.x"
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -84,7 +84,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [ "1.21.x" ]
go-version: [ "1.22.x" ]
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.21.x"
go-version: "1.22.x"
- run: "cd misc/gendocs && make install gen"
- uses: actions/configure-pages@v4
id: pages
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.20.x"
- "1.21.x"
- "1.22.x"
goarch: [ "amd64" ]
goos: [ "linux" ]
program:
Expand All @@ -53,8 +53,8 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.20.x"
- "1.21.x"
- "1.22.x"
args:
- _test.gnoland
- _test.gnokey
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic"
make ${{ matrix.args }}
- uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }}
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.22.x' }}
with:
name: ${{runner.os}}-coverage-gnoland-${{ matrix.args}}-${{matrix.goversion}}
path: ./gno.land/coverage.out
Expand Down Expand Up @@ -115,6 +115,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.22.x
# TODO: setup docker caching
- run: make test.docker
- run: docker logs int_gnoland || true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/gnovm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
fail-fast: false
matrix:
goversion: # two latest versions
- "1.20.x"
- "1.21.x"
- "1.22.x"
goenv: # TODO: replace with pairs, so it's easier to read in the GH interface.
- "GOARCH=amd64 GOOS=linux"
- "GOARCH=wasm GOOS=js"
Expand All @@ -53,8 +53,8 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.20.x"
- "1.21.x"
- "1.22.x"
args:
- _test.cmd
- _test.pkg
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
# Run target test
make ${{ matrix.args }}
- uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }}
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.22.x' }}
with:
name: ${{runner.os}}-coverage-gnovm-${{ matrix.args}}-${{matrix.goversion}}
path: ${{ env.COVERAGE_DIR }}
Expand All @@ -122,7 +122,7 @@ jobs:
path: ${{ env.COVERAGE_DATA }}
- uses: actions/setup-go@v4
with:
go-version: "1.21.x"
go-version: "1.22.x"
- name: Merge coverages
working-directory: ${{ env.COVERAGE_DATA }}
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Lint
uses: golangci/golangci-lint-action@v3
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Install make
run: sudo apt-get install -y make
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Install make
run: sudo apt-get install -y make
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.21.x"
- "1.22.x"
program:
- "genstd"
runs-on: ubuntu-latest
Expand All @@ -49,7 +49,7 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.21.x"
- "1.22.x"
args:
- _test.genstd
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tm2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.20.x"
- "1.21.x"
- "1.22.x"
goarch: [ "amd64" ]
goos: [ "linux" ]
program: [ "./pkg/amino/cmd/aminoscan", "./pkg/amino/cmd/goscan", "./pkg/autofile/cmd", "./pkg/iavl/cmd/iaviewer" ]
Expand All @@ -48,8 +48,8 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.20.x"
- "1.21.x"
- "1.22.x"
args:
- _test.flappy
- _test.pkg.amino
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
make ${{ matrix.args }}
touch coverage.out
- uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }}
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.22.x' }}
with:
name: ${{runner.os}}-coverage-tm2-${{ matrix.args}}-${{matrix.goversion}}
path: ./tm2/coverage.out
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build
FROM golang:1.21 AS build
FROM golang:1.22 AS build
RUN mkdir -p /opt/gno/src /opt/build
WORKDIR /opt/build
ADD go.mod go.sum ./
Expand Down
8 changes: 3 additions & 5 deletions contribs/gnodev/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
module github.com/gnolang/gno/contribs/gnodev

go 1.20
go 1.21

replace github.com/gnolang/gno => ../..

require (
github.com/fsnotify/fsnotify v1.7.0
github.com/gnolang/gno v0.0.0-00010101000000-000000000000
go.uber.org/zap v1.24.0
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3
go.uber.org/zap v1.26.0
golang.org/x/term v0.16.0
)

Expand Down Expand Up @@ -56,9 +55,8 @@ require (
github.com/zondax/ledger-go v0.14.3 // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.opencensus.io v0.22.5 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap/exp v0.1.0 // indirect
go.uber.org/zap/exp v0.2.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
Expand Down
Loading
Loading