Skip to content

fix: upgrade sonic loader for go1.26#15

Merged
liuq19 merged 1 commit intocloudwego:mainfrom
liuq19:fix/loader-go126
Apr 30, 2026
Merged

fix: upgrade sonic loader for go1.26#15
liuq19 merged 1 commit intocloudwego:mainfrom
liuq19:fix/loader-go126

Conversation

@liuq19
Copy link
Copy Markdown
Contributor

@liuq19 liuq19 commented Apr 29, 2026

Summary

  • Upgrade github.com/bytedance/sonic/loader from v0.3.0 to v0.5.1.
  • Refresh dependency sums in both the root module and the bench module.
  • Extend the unit/benchmark Go matrix to cover 1.17.x through 1.26.x.
  • Scope reviewdog staticcheck reports to newly added/modified lines, so existing repository lint debt does not fail unrelated PRs.

Motivation

sonic/loader v0.3.0 can compile with Go 1.26 in the amd64 native path, but it fails at runtime during loader initialization. On darwin/amd64 with Go 1.26.0, the native tests fail in runtime.moduledataverify1 with:

fatal error: invalid function symbol table

sonic/loader v0.5.0 added upstream Go 1.26 support, and v0.5.1 is the latest loader tag.

Validation

  • GOTOOLCHAIN=go1.26.0 GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go test -run 'TestEncoder|TestDecoder|TestSubrCompatibilitySymbols' -count=1 -v .
  • GOTOOLCHAIN=go1.26.0 CGO_ENABLED=0 go test ./...
  • GOTOOLCHAIN=go1.26.0 go test -bench=. -benchmem -run=none ./... in bench/
  • GOTOOLCHAIN=go1.25.5 CGO_ENABLED=0 go test ./...
  • GOTOOLCHAIN=go1.24.10 CGO_ENABLED=0 go test ./...
  • git diff --check
  • typos

Copilot AI review requested due to automatic review settings April 29, 2026 08:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades module dependencies to ensure sonic/loader works correctly at runtime on Go 1.26 (notably for darwin/amd64 native path), while refreshing the module sums and related test dependencies.

Changes:

  • Bump github.com/bytedance/sonic/loader from v0.3.0 to v0.5.1.
  • Update github.com/stretchr/testify to v1.10.0 and refresh go.sum entries (including transitive test deps).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
go.mod Updates direct dependency versions for sonic/loader and testify.
go.sum Refreshes sums to match the updated module graph (including updated objx and testify entries).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod
@liuq19 liuq19 force-pushed the fix/loader-go126 branch 4 times, most recently from 2ab1e5d to 18eea7b Compare April 29, 2026 09:31
@liuq19 liuq19 force-pushed the fix/loader-go126 branch from 18eea7b to 44afa73 Compare April 29, 2026 09:35
strategy:
matrix:
go: [ 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x]
go: [ 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x, 1.24.x, 1.25.x, 1.26.x]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把 1.17 去了吧,不需要跑这么多CI

@liuq19 liuq19 merged commit 4122261 into cloudwego:main Apr 30, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants