Skip to content

Commit

Permalink
chore: upgrade to go 1.23 (#12910)
Browse files Browse the repository at this point in the history
* Upgrade to go 1.23

* Fix lint issues:

   * `non-constant format string`
  • Loading branch information
masih authored Feb 19, 2025
1 parent 5582b1a commit e113aa6
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/builtin-actor-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.23
- run: go test -tags=release ./build
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
- chore: switch to pure-go zstd decoder for snapshot imports. ([filecoin-project/lotus#12857](https://github.com/filecoin-project/lotus/pull/12857))
- feat: automatically detect if the genesis is zstd compressed. ([filecoin-project/lotus#12885](https://github.com/filecoin-project/lotus/pull/12885)
- `lotus send` now supports `--csv` option for sending multiple transactions. ([filecoin-project/lotus#12892](https://github.com/filecoin-project/lotus/pull/12892))

- 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)

- chore: upgrade to a minimum Golang version of `1.23.6` ([filecoin-project/lotus#12910](https://github.com/filecoin-project/lotus/pull/12910)

# UNRELEASED v.1.32.0

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#####################################
FROM golang:1.22.7-bullseye AS lotus-builder
FROM golang:1.23.6-bullseye AS lotus-builder
MAINTAINER Lotus Development Team

RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev
Expand Down
2 changes: 1 addition & 1 deletion GO_VERSION_MIN
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.7
1.23.6
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell
$(error Update Golang to version to at least $(shell cat GO_VERSION_MIN))
endif

GOLANGCI_LINT_VERSION=v1.59.0
GOLANGCI_LINT_VERSION=v1.60.1

# git modules that need to be loaded
MODULES:=
Expand Down
2 changes: 1 addition & 1 deletion chain/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ func (syncer *Syncer) ValidateTipSet(ctx context.Context, fts *store.FullTipSet,
futures = append(futures, async.Err(func() error {
if err := syncer.ValidateBlock(ctx, b, useCache); err != nil {
if isPermanent(err) {
syncer.bad.Add(b.Cid(), NewBadBlockReason([]cid.Cid{b.Cid()}, err.Error()))
syncer.bad.Add(b.Cid(), NewBadBlockReason([]cid.Cid{b.Cid()}, "%s", err.Error()))
}
return xerrors.Errorf("validating block %s: %w", b.Cid(), err)
}
Expand Down
4 changes: 2 additions & 2 deletions chain/vm/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func (rt *Runtime) CreateActor(codeID cid.Cid, addr address.Address) {
}
act, aerr := rt.vm.areg.Create(codeID, rt)
if aerr != nil {
rt.Abortf(aerr.RetCode(), aerr.Error())
rt.Abortf(aerr.RetCode(), "%s", aerr.Error())
}

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

func (rt *Runtime) AbortStateMsg(msg string) {
panic(aerrors.NewfSkip(3, 101, msg))
panic(aerrors.NewfSkip(3, 101, "%s", msg))
}

func (rt *Runtime) ValidateImmediateCallerType(ts ...cid.Cid) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/filecoin-project/lotus

go 1.22.7
go 1.23.6

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

Expand Down
2 changes: 1 addition & 1 deletion itests/eth_conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func TestEthOpenRPCConformance(t *testing.T) {
}
t.Run(name, func(t *testing.T) {
if tc.skipReason != "" {
t.Skipf(tc.skipReason)
t.Skip(tc.skipReason)
}

schema, ok := schemas[tc.method]
Expand Down
4 changes: 2 additions & 2 deletions itests/eth_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2344,7 +2344,7 @@ func AssertEthLogs(t *testing.T, actual []*ethtypes.EthLog, expected []ExpectedE
}
}

t.Errorf(buf.String())
t.Error(buf.String())
}
}

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

0 comments on commit e113aa6

Please sign in to comment.