Skip to content

Commit fd87d6a

Browse files
committed
Upgrade golang to 1.23.6
Also upgrade various codegen tools
1 parent a8f8282 commit fd87d6a

35 files changed

+460
-768
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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.27.0

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: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
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+
1117

1218
build:
1319
${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 +61,33 @@ coverage:
5561
clean:
5662
rm -f ${EXECUTABLE}
5763

58-
install-tools: install-codegen-tools install-golangci-lint install-cobra install-gofumpt install-gci install-gotestsum
64+
install-tools: install-codegen-tools install-gofumpt install-gci install-gotestsum
5965

6066
# code generation tools: pin version
61-
install-codegen-tools: install-npm install-abigen install-sqlc install-protoc-gen-go install-oapi-codegen install-go-enum
67+
install-codegen-tools: install-npm install-protoc-gen-go install-oapi-codegen install-go-enum
6268

6369
../contracts/node_modules/.mark-npm-install: ../contracts/package.json ../contracts/package-lock.json
6470
cd ../contracts && npm install
6571
@touch ../contracts/node_modules/.mark-npm-install
6672

6773
install-npm: ../contracts/node_modules/.mark-npm-install
6874

69-
${GOPATH}/bin/sqlc:
70-
${GO} install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.22.0
71-
install-sqlc: ${GOPATH}/bin/sqlc
72-
7375

7476
${GOPATH}/bin/go-enum:
75-
${GO} install github.com/abice/go-enum@v0.5.6
77+
${GO} install github.com/abice/go-enum@v${TOOL_VERSTION_GOENUM}
7678
install-go-enum: ${GOPATH}/bin/go-enum
7779

78-
${GOPATH}/bin/abigen:
79-
${GO} install github.com/ethereum/go-ethereum/cmd/abigen@v1.12.0
80-
install-abigen: ${GOPATH}/bin/abigen
81-
8280

8381
${GOPATH}/bin/protoc-gen-go:
84-
${GO} install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30.0
82+
${GO} install google.golang.org/protobuf/cmd/protoc-gen-go@v${TOOL_VERSION_PROTOCGENGO}
8583
install-protoc-gen-go: ${GOPATH}/bin/protoc-gen-go
8684

8785

8886
${GOPATH}/bin/oapi-codegen:
89-
${GO} install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.9.1
87+
${GO} install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v${TOOL_VERSION_OAPICODEGEN}
9088
install-oapi-codegen: ${GOPATH}/bin/oapi-codegen
9189

9290
# non code generation tools
93-
install-golangci-lint:
94-
${GO} install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2
95-
9691
install-gofumpt:
9792
${GO} install mvdan.cc/gofumpt@latest
9893

@@ -116,7 +111,7 @@ lint:
116111

117112
lint-changes:
118113
base=`git merge-base HEAD origin/main`; \
119-
golangci-lint --verbose run --new-from-rev $${base}
114+
golangci-lint --verbose run --concurrency ${GOLINT_CONCURRENCY} --print-resources-usage --new-from-rev $${base}
120115

121116
abigen:
122117
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.

rolling-shutter/chainobserver/db/keyper/keyper.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)