-
Notifications
You must be signed in to change notification settings - Fork 537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatible with Go 1.23 due to locking down linkname
using
#1146
Comments
For the following code: package main
import (
"context"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/app/server"
"github.com/cloudwego/hertz/pkg/common/utils"
"github.com/cloudwego/hertz/pkg/protocol/consts"
)
func main() {
h := server.Default(server.WithHostPorts(":12345"))
h.GET("/ping", func(c context.Context, ctx *app.RequestContext) {
ctx.JSON(consts.StatusOK, utils.H{"ping": "pong"})
})
h.Spin()
} Compiling with Go 1.23-rc1: go build -tags stdjson and the error message is:
In addition, hertz also has |
I found that we used sonic https://github.com/cloudwego/hertz/blob/develop/pkg/app/server/binding/internal/decoder/sonic_required.go here, but with a wrong(?) |
@li-jin-gou Hi. The code above cannot be compiled under Go 1.23-rc1. Could you please take a look? |
Describe the bug
Upstream JSON lib
sonic
is suffering fromlinkname
usage locking down. And it affects hertz according to reports.Originally posted by @xin-hao-awx in bytedance/sonic#660 (comment)
Also can find more information at bytedance/sonic#637
BTW,
linkname
is used in hertz, too. So maybe we need an investigation.To Reproduce
Expected behavior
No error should be presented.
Hertz version:
On
develop
branchEnvironment:
Additional context
We have an update PR (#1106 ) but idle for a time. I can compile a naive hertz project with Go 1.21, and it runs OK. Please consider bumping the PR status.
The text was updated successfully, but these errors were encountered: