Skip to content

Commit 836ed13

Browse files
Merge pull request #576 from shutter-network/chore/upgrade-go-1.23.6
Upgrade golang to 1.23.6
2 parents 722f022 + e9fdfa0 commit 836ed13

38 files changed

+725
-1046
lines changed

.asdf-plugins

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,15 @@
44
# To automatically install these run `make install-asdf-plugins` inside
55
# the 'rolling-shutter' directory.
66

7-
babashka
8-
binaryen https://github.com/birros/asdf-binaryen.git
97
circleci https://github.com/ulope/asdf-circleci.git
10-
clojure
118
direnv
129
golang
1310
golangci-lint
14-
java
1511
nodejs
1612
postgres
1713
pre-commit
1814
protoc
1915
python
2016
shfmt
2117
solidity
22-
sqlc https://github.com/schmir/asdf-sqlc.git
23-
tinygo https://github.com/schmir/asdf-tinygo
18+
sqlc https://github.com/ulope/asdf-sqlc.git

.circleci/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ executors:
2929

3030
go:
3131
docker:
32-
- image: cimg/go:1.21.1
32+
- image: cimg/go:1.23.6
3333
environment:
3434
GO111MODULE: "on"
3535
PIP_DISABLE_PIP_VERSION_CHECK: "1"
3636

3737
go-integration:
3838
docker:
39-
- image: cimg/go:1.21.1
39+
- image: cimg/go:1.23.6
4040
environment:
4141
GO111MODULE: "on"
4242
PIP_DISABLE_PIP_VERSION_CHECK: "1"
@@ -149,9 +149,9 @@ jobs:
149149
- run:
150150
name: "Install asdf managed executables"
151151
command: |
152-
asdf install tinygo
153-
asdf install binaryen
154-
asdf install nodejs
152+
asdf install tinygo latest
153+
asdf install binaryen latest
154+
asdf install nodejs latest
155155
- run:
156156
name: "Run unit tests with gotestsum"
157157
command: |
@@ -176,7 +176,7 @@ jobs:
176176

177177
rs-lint:
178178
executor: go
179-
resource_class: medium+
179+
resource_class: xlarge
180180
working_directory: ~/src/rolling-shutter
181181
steps:
182182
- checkout:
@@ -194,7 +194,7 @@ jobs:
194194
asdf plugin add golangci-lint || true
195195
asdf install golangci-lint
196196
- run: |
197-
make lint-changes
197+
GOLINT_CONCURRENCY=3 make lint-changes
198198
- save_cache:
199199
key: rs-lint-v14-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
200200
paths:

.tool-versions

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
babashka 1.3.182
2-
binaryen 114
3-
circleci 0.1.28811
4-
clojure 1.11.1.1386
5-
golang 1.21.4
6-
golangci-lint 1.55.2
7-
java temurin-17.0.5+8
1+
circleci 0.1.31425
2+
golang 1.23.6
3+
golangci-lint 1.64.5
84
nodejs 18.17.0
95
postgres 14.2
10-
pre-commit 3.6.0
11-
protoc 22.3
12-
shfmt 3.7.0
6+
pre-commit 4.1.0
7+
protoc 29.3
8+
shfmt 3.10.0
139
solidity 0.8.9
14-
sqlc 1.22.0
15-
tinygo 0.29.0
10+
sqlc 1.28.0

docker/build-src/rolling-shutter/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.21 AS builder
1+
FROM golang:1.23.6 AS builder
22
ENV GOMODCACHE=/root/.cache/mod
33
# Fetch go modules separately to improve cache usage
44
RUN mkdir /gomod

rolling-shutter/.golangci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,39 +113,41 @@ linters:
113113
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
114114
disable-all: true
115115
enable:
116-
- bodyclose
116+
# `staticcheck` and `gosimple` are disabled because of https://github.com/golangci/golangci-lint/issues/5449
117117
# - depguard
118+
# - unused
119+
- bodyclose
120+
- copyloopvar
118121
- dogsled
119122
- errcheck
120123
- exhaustive
124+
- forbidigo
121125
- funlen
122126
- gci
123127
- goconst
124128
- gocritic
125129
- gocyclo
130+
- godot
126131
- gofumpt
127-
- revive
128132
- goprintffuncname
129133
- gosec
130-
- gosimple
134+
# - gosimple
131135
- govet
132136
- ineffassign
133137
- lll
134138
- misspell
135139
- nakedret
140+
- nilnesserr
136141
- noctx
137142
- nolintlint
138-
- exportloopref
139-
- staticcheck
143+
- revive
144+
# - staticcheck
140145
- stylecheck
146+
- thelper
141147
- typecheck
142148
- unconvert
143149
- unparam
144-
# - unused
145150
- whitespace
146-
- thelper
147-
- godot
148-
- forbidigo
149151

150152
# don't enable:
151153
# - asciicheck

rolling-shutter/Makefile

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
.POSIX:
22

3-
GO ?= go
4-
GOFLAGS ?=
5-
TINYGO ?= tinygo
6-
WASMOPT ?= wasm-opt
7-
BINDIR ?= ./bin
8-
WASMDIR ?= ../js/shutter-crypto
9-
EXECUTABLE ?= ${BINDIR}/rolling-shutter
10-
GOPATH ?= $(${GO} env GOPATH)
3+
GO ?= go
4+
GOFLAGS ?=
5+
TINYGO ?= tinygo
6+
WASMOPT ?= wasm-opt
7+
BINDIR ?= ./bin
8+
WASMDIR ?= ../js/shutter-crypto
9+
EXECUTABLE ?= ${BINDIR}/rolling-shutter
10+
GOPATH ?= $(${GO} env GOPATH)
11+
GOLINT_CONCURRENCY ?= 0
12+
13+
TOOL_VERSTION_GOENUM ?= 0.6.0
14+
TOOL_VERSION_PROTOCGENGO ?= 1.36.5
15+
TOOL_VERSION_OAPICODEGEN ?= 1.16.1
16+
TOOL_VERSION_ABIGEN ?= 1.15.7
17+
1118

1219
build:
1320
${GO} build ${GOFLAGS} -ldflags="-X github.com/shutter-network/rolling-shutter/rolling-shutter/cmd/shversion.version=$(shell git describe --always --dirty)" -o ${EXECUTABLE}
@@ -55,44 +62,40 @@ coverage:
5562
clean:
5663
rm -f ${EXECUTABLE}
5764

58-
install-tools: install-codegen-tools install-golangci-lint install-cobra install-gofumpt install-gci install-gotestsum
65+
install-tools: install-codegen-tools install-gofumpt install-gci install-gotestsum
5966

6067
# code generation tools: pin version
6168
install-codegen-tools: install-npm install-abigen install-sqlc install-protoc-gen-go install-oapi-codegen install-go-enum
6269

70+
${GOPATH}/bin/sqlc:
71+
${GO} install github.com/sqlc-dev/sqlc/cmd/[email protected]
72+
install-sqlc: ${GOPATH}/bin/sqlc
73+
6374
../contracts/node_modules/.mark-npm-install: ../contracts/package.json ../contracts/package-lock.json
6475
cd ../contracts && npm install
6576
@touch ../contracts/node_modules/.mark-npm-install
6677

6778
install-npm: ../contracts/node_modules/.mark-npm-install
6879

69-
${GOPATH}/bin/sqlc:
70-
${GO} install github.com/sqlc-dev/sqlc/cmd/[email protected]
71-
install-sqlc: ${GOPATH}/bin/sqlc
72-
7380

7481
${GOPATH}/bin/go-enum:
75-
${GO} install github.com/abice/go-enum@v0.5.6
82+
${GO} install github.com/abice/go-enum@v${TOOL_VERSTION_GOENUM}
7683
install-go-enum: ${GOPATH}/bin/go-enum
7784

7885
${GOPATH}/bin/abigen:
79-
${GO} install github.com/ethereum/go-ethereum/cmd/abigen@v1.12.0
86+
${GO} install github.com/ethereum/go-ethereum/cmd/abigen@v${TOOL_VERSION_ABIGEN}
8087
install-abigen: ${GOPATH}/bin/abigen
8188

82-
8389
${GOPATH}/bin/protoc-gen-go:
84-
${GO} install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30.0
90+
${GO} install google.golang.org/protobuf/cmd/protoc-gen-go@v${TOOL_VERSION_PROTOCGENGO}
8591
install-protoc-gen-go: ${GOPATH}/bin/protoc-gen-go
8692

8793

8894
${GOPATH}/bin/oapi-codegen:
89-
${GO} install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.9.1
95+
${GO} install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v${TOOL_VERSION_OAPICODEGEN}
9096
install-oapi-codegen: ${GOPATH}/bin/oapi-codegen
9197

9298
# non code generation tools
93-
install-golangci-lint:
94-
${GO} install github.com/golangci/golangci-lint/cmd/[email protected]
95-
9699
install-gofumpt:
97100
${GO} install mvdan.cc/gofumpt@latest
98101

@@ -116,7 +119,7 @@ lint:
116119

117120
lint-changes:
118121
base=`git merge-base HEAD origin/main`; \
119-
golangci-lint --verbose run --new-from-rev $${base}
122+
golangci-lint --verbose run --concurrency ${GOLINT_CONCURRENCY} --print-resources-usage --new-from-rev $${base}
120123

121124
abigen:
122125
go generate -x ./contract

rolling-shutter/chainobserver/db/collator/collator.sqlc.gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rolling-shutter/chainobserver/db/collator/db.sqlc.gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rolling-shutter/chainobserver/db/collator/models.sqlc.gen.go

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rolling-shutter/chainobserver/db/keyper/db.sqlc.gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)