Skip to content

Commit e113aa6

Browse files
authored
chore: upgrade to go 1.23 (#12910)
* Upgrade to go 1.23 * Fix lint issues: * `non-constant format string`
1 parent 5582b1a commit e113aa6

File tree

10 files changed

+12
-13
lines changed

10 files changed

+12
-13
lines changed

.github/workflows/builtin-actor-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-go@v5
2121
with:
22-
go-version: 1.22
22+
go-version: 1.23
2323
- run: go test -tags=release ./build

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
- chore: switch to pure-go zstd decoder for snapshot imports. ([filecoin-project/lotus#12857](https://github.com/filecoin-project/lotus/pull/12857))
1616
- feat: automatically detect if the genesis is zstd compressed. ([filecoin-project/lotus#12885](https://github.com/filecoin-project/lotus/pull/12885)
1717
- `lotus send` now supports `--csv` option for sending multiple transactions. ([filecoin-project/lotus#12892](https://github.com/filecoin-project/lotus/pull/12892))
18-
1918
- chore: upgrade to the latest go-f3 and allow F3 chain exchange topics ([filecoin-project/lotus#12893](https://github.com/filecoin-project/lotus/pull/12893)
20-
19+
- chore: upgrade to a minimum Golang version of `1.23.6` ([filecoin-project/lotus#12910](https://github.com/filecoin-project/lotus/pull/12910)
2120

2221
# UNRELEASED v.1.32.0
2322

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#####################################
2-
FROM golang:1.22.7-bullseye AS lotus-builder
2+
FROM golang:1.23.6-bullseye AS lotus-builder
33
MAINTAINER Lotus Development Team
44

55
RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev

GO_VERSION_MIN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.22.7
1+
1.23.6

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell
1616
$(error Update Golang to version to at least $(shell cat GO_VERSION_MIN))
1717
endif
1818

19-
GOLANGCI_LINT_VERSION=v1.59.0
19+
GOLANGCI_LINT_VERSION=v1.60.1
2020

2121
# git modules that need to be loaded
2222
MODULES:=

chain/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ func (syncer *Syncer) ValidateTipSet(ctx context.Context, fts *store.FullTipSet,
600600
futures = append(futures, async.Err(func() error {
601601
if err := syncer.ValidateBlock(ctx, b, useCache); err != nil {
602602
if isPermanent(err) {
603-
syncer.bad.Add(b.Cid(), NewBadBlockReason([]cid.Cid{b.Cid()}, err.Error()))
603+
syncer.bad.Add(b.Cid(), NewBadBlockReason([]cid.Cid{b.Cid()}, "%s", err.Error()))
604604
}
605605
return xerrors.Errorf("validating block %s: %w", b.Cid(), err)
606606
}

chain/vm/runtime.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func (rt *Runtime) CreateActor(codeID cid.Cid, addr address.Address) {
289289
}
290290
act, aerr := rt.vm.areg.Create(codeID, rt)
291291
if aerr != nil {
292-
rt.Abortf(aerr.RetCode(), aerr.Error())
292+
rt.Abortf(aerr.RetCode(), "%s", aerr.Error())
293293
}
294294

295295
_, err := rt.state.GetActor(addr)
@@ -372,7 +372,7 @@ func (rt *Runtime) Abortf(code exitcode.ExitCode, msg string, args ...interface{
372372
}
373373

374374
func (rt *Runtime) AbortStateMsg(msg string) {
375-
panic(aerrors.NewfSkip(3, 101, msg))
375+
panic(aerrors.NewfSkip(3, 101, "%s", msg))
376376
}
377377

378378
func (rt *Runtime) ValidateImmediateCallerType(ts ...cid.Cid) {

go.mod

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

3-
go 1.22.7
3+
go 1.23.6
44

55
retract v1.14.0 // Accidentally force-pushed tag, use v1.14.1+ instead.
66

itests/eth_conformance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ func TestEthOpenRPCConformance(t *testing.T) {
408408
}
409409
t.Run(name, func(t *testing.T) {
410410
if tc.skipReason != "" {
411-
t.Skipf(tc.skipReason)
411+
t.Skip(tc.skipReason)
412412
}
413413

414414
schema, ok := schemas[tc.method]

itests/eth_filter_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,7 +2344,7 @@ func AssertEthLogs(t *testing.T, actual []*ethtypes.EthLog, expected []ExpectedE
23442344
}
23452345
}
23462346

2347-
t.Errorf(buf.String())
2347+
t.Error(buf.String())
23482348
}
23492349
}
23502350

@@ -2355,7 +2355,7 @@ func AssertEthLogs(t *testing.T, actual []*ethtypes.EthLog, expected []ExpectedE
23552355
buf.WriteString(fmt.Sprintf(" address: %s\n", expected[i].Address))
23562356
buf.WriteString(fmt.Sprintf(" topics: %s\n", formatTopics(expected[i].Topics)))
23572357
buf.WriteString(fmt.Sprintf(" data: %x\n", expected[i].Data))
2358-
t.Errorf(buf.String())
2358+
t.Error(buf.String())
23592359
}
23602360
}
23612361
}

0 commit comments

Comments
 (0)