Skip to content

Commit 9bed633

Browse files
authored
chore: Upgrade the Cosmos-SDK to Go 1.18 (cosmos#11663)
## Description This PR works towards the completion of the Go Workspaces issue cosmos#11450 It does the following: * Upgrades the Cosmos-SDK to Go v1.18 * Changes the version of gogo/protobuf to v1.3.2, which exists upstream, unlike v1.3.3 everywhere possible. The use of the 1.3.3 version number and lack of an upstream version is the blocker for Go Workspaces. --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
1 parent 71e6138 commit 9bed633

File tree

24 files changed

+54
-283
lines changed

24 files changed

+54
-283
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v3
2020
- uses: actions/setup-go@v3
2121
with:
22-
go-version: 1.17
22+
go-version: 1.18
2323
# Initializes the CodeQL tools for scanning.
2424
- name: Initialize CodeQL
2525
uses: github/codeql-action/init@v1

.github/workflows/cosmovisor-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fetch-depth: 0
1414
- uses: actions/setup-go@v3
1515
with:
16-
go-version: 1.17
16+
go-version: 1.18
1717
# get 'v*.*.*' part from 'cosmovisor/v*.*.*' and save to $GITHUB_ENV
1818
- name: Set env
1919
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/cosmovisor/}" >> $GITHUB_ENV

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/setup-go@v3
1616
with:
17-
go-version: 1.17
17+
go-version: 1.18
1818
- uses: technote-space/get-diff-action@v6.0.1
1919
id: git_diff
2020
with:

.github/workflows/sims.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v3
2323
- uses: actions/setup-go@v3
2424
with:
25-
go-version: 1.17
25+
go-version: 1.18
2626
- name: Display go version
2727
run: go version
2828
- run: make build
@@ -33,11 +33,11 @@ jobs:
3333
steps:
3434
- uses: actions/setup-go@v3
3535
with:
36-
go-version: 1.17
36+
go-version: 1.18
3737
- name: Display go version
3838
run: go version
3939
- name: Install runsim
40-
run: export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
40+
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
4141
- uses: actions/cache@v3
4242
with:
4343
path: ~/go/bin
@@ -51,7 +51,7 @@ jobs:
5151
- uses: actions/checkout@v3
5252
- uses: actions/setup-go@v3
5353
with:
54-
go-version: 1.17
54+
go-version: 1.18
5555
- name: Display go version
5656
run: go version
5757
- uses: actions/cache@v3
@@ -70,7 +70,7 @@ jobs:
7070
- uses: actions/checkout@v3
7171
- uses: actions/setup-go@v3
7272
with:
73-
go-version: 1.17
73+
go-version: 1.18
7474
- name: Display go version
7575
run: go version
7676
- uses: actions/cache@v3
@@ -89,7 +89,7 @@ jobs:
8989
- uses: actions/checkout@v3
9090
- uses: actions/setup-go@v3
9191
with:
92-
go-version: 1.17
92+
go-version: 1.18
9393
- name: Display go version
9494
run: go version
9595
- uses: actions/cache@v3

.github/workflows/tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Install Go
1616
uses: actions/setup-go@v3
1717
with:
18-
go-version: 1.17
18+
go-version: 1.18
1919
- name: Unshallow
2020
run: git fetch --prune --unshallow
2121
- name: Create release

.github/workflows/test-race.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,26 @@ on:
99

1010
permissions:
1111
contents: read
12-
12+
1313
jobs:
1414
cleanup-runs:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: rokroskar/workflow-run-cleanup-action@master
18-
env:
19-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
17+
- uses: rokroskar/workflow-run-cleanup-action@master
18+
env:
19+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2020
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
2121

2222
install-tparse:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/setup-go@v3
2626
with:
27-
go-version: 1.17
27+
go-version: 1.18
2828
- name: Display go version
2929
run: go version
3030
- name: install tparse
31-
run: |
32-
export GO111MODULE="on" && go get github.com/mfridman/tparse@v0.8.3
31+
run: go install github.com/mfridman/tparse@v0.8.3
3332
- uses: actions/cache@v3
3433
with:
3534
path: ~/go/bin
@@ -41,7 +40,7 @@ jobs:
4140
- uses: actions/checkout@v3
4241
- uses: actions/setup-go@v3
4342
with:
44-
go-version: 1.17
43+
go-version: 1.18
4544
- uses: technote-space/get-diff-action@v6.0.1
4645
id: git_diff
4746
with:
@@ -61,7 +60,7 @@ jobs:
6160
- uses: actions/checkout@v3
6261
- uses: actions/setup-go@v3
6362
with:
64-
go-version: 1.17
63+
go-version: 1.18
6564
- name: Create a file with all core Cosmos SDK pkgs
6665
run: go list ./... > pkgs.txt
6766
- name: Split pkgs into 4 files
@@ -95,7 +94,7 @@ jobs:
9594
- uses: actions/checkout@v3
9695
- uses: actions/setup-go@v3
9796
with:
98-
go-version: 1.17
97+
go-version: 1.18
9998
- uses: technote-space/get-diff-action@v6.0.1
10099
with:
101100
PATTERNS: |

.github/workflows/test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v3
2828
- uses: actions/setup-go@v3
2929
with:
30-
go-version: 1.17
30+
go-version: 1.18
3131
- uses: technote-space/get-diff-action@v6.0.1
3232
id: git_diff
3333
with:
@@ -48,7 +48,7 @@ jobs:
4848
- uses: actions/checkout@v3
4949
- uses: actions/setup-go@v3
5050
with:
51-
go-version: 1.17
51+
go-version: 1.18
5252
- uses: technote-space/get-diff-action@v6.0.1
5353
id: git_diff
5454
with:
@@ -71,7 +71,7 @@ jobs:
7171
- uses: actions/checkout@v3
7272
- uses: actions/setup-go@v3
7373
with:
74-
go-version: 1.17
74+
go-version: 1.18
7575
- name: Create a file with all core Cosmos SDK pkgs
7676
run: go list ./... > pkgs.txt
7777
- name: Split pkgs into 4 files
@@ -105,7 +105,7 @@ jobs:
105105
- uses: actions/checkout@v3
106106
- uses: actions/setup-go@v3
107107
with:
108-
go-version: 1.17
108+
go-version: 1.18
109109
- uses: technote-space/get-diff-action@v6.0.1
110110
with:
111111
PATTERNS: |
@@ -201,7 +201,7 @@ jobs:
201201
- uses: actions/checkout@v3
202202
- uses: actions/setup-go@v3
203203
with:
204-
go-version: 1.17
204+
go-version: 1.18
205205
- uses: technote-space/get-diff-action@v6.0.1
206206
id: git_diff
207207
with:
@@ -224,11 +224,11 @@ jobs:
224224
steps:
225225
- uses: actions/setup-go@v3
226226
with:
227-
go-version: 1.17
227+
go-version: 1.18
228228
- name: Display go version
229229
run: go version
230230
- name: Install runsim
231-
run: export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
231+
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
232232
- uses: actions/cache@v3
233233
with:
234234
path: ~/go/bin
@@ -241,7 +241,7 @@ jobs:
241241
- uses: actions/checkout@v3
242242
- uses: actions/setup-go@v3
243243
with:
244-
go-version: 1.17
244+
go-version: 1.18
245245
- name: Display go version
246246
run: go version
247247
- uses: technote-space/get-diff-action@v6.0.1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The Cosmos SDK is a framework for building blockchain applications. [Tendermint
4545
**WARNING**: The Cosmos SDK has mostly stabilized, but we are still making some
4646
breaking changes.
4747

48-
**Note**: Requires [Go 1.17+](https://golang.org/dl/)
48+
**Note**: Requires [Go 1.18+](https://go.dev/dl)
4949

5050
## Quick Start
5151

api/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/cosmos/cosmos-sdk/api
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/cosmos/cosmos-proto v1.0.0-alpha7

container/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/cosmos/cosmos-sdk/container
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/goccy/go-graphviz v0.0.9

0 commit comments

Comments
 (0)