Skip to content
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

Support for go1.21 and newer versions of Go #468

Closed
r-hang opened this issue Jun 26, 2023 · 13 comments
Closed

Support for go1.21 and newer versions of Go #468

r-hang opened this issue Jun 26, 2023 · 13 comments
Assignees

Comments

@r-hang
Copy link

r-hang commented Jun 26, 2023

The go1.21 release candidate is now live but the README.md of this repository states that only Go 1.15~1.20 is supported. Could this library be updated and released to support go1.21?

Our repository depends on this library and efforts to prepare it to run on the latest versions of Go (i.e. 1.21) is currently blocked for this reason.

Is it possible to compose this library's logic to work with future versions of Go in some baseline/degraded capacity? While it's understandable some optimizations must be based on version specific details, being able to build and run this library in some form under newer Go versions seems desirable.

@liuq19
Copy link
Collaborator

liuq19 commented Jun 27, 2023

Thanks, we will fix it

@r-hang
Copy link
Author

r-hang commented Jun 27, 2023

Thank you! Do you have a rough sense of when this might happen? I'm looking to plan some work around this.

@AsterDY
Copy link
Collaborator

AsterDY commented Jun 28, 2023

build on Go1.21 is not blocked since we have fallbacked it. you can try it

@r-hang
Copy link
Author

r-hang commented Jun 28, 2023

Is there a specific commit where this fallback is added at?

I'm still seeing this error after upgrading to v1.9.2, as a minor note we're building with Bazel, but that shouldn't affect the core error.

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging external/com_github_bytedance_sonic/loader/funcdata.go:37:32: undefined: _func external/com_github_bytedance_sonic/loader/funcdata.go:74:12: undefined: moduledata external/com_github_bytedance_sonic/loader/funcdata.go:77:18: undefined: moduledata external/com_github_bytedance_sonic/loader/funcdata.go:188:28: undefined: compilationUnit external/com_github_bytedance_sonic/loader/stubs.go:26:22: undefined: moduledata external/com_github_bytedance_sonic/loader/stubs.go:30:26: undefined: moduledata external/com_github_bytedance_sonic/loader/stubs.go:38:27: undefined: moduledata compilepkg: error running subcommand external/go_sdk/pkg/tool/linux_amd64/compile: exit status 2

@AsterDY
Copy link
Collaborator

AsterDY commented Jun 29, 2023

I mean sonic main packages,are you using other other package like loader???
image

@GuangmingLuo
Copy link
Member

@r-hang Hi, will you mind to leave a comment here to log that your company is using sonic so that we can support this project better ? #352

@r-hang
Copy link
Author

r-hang commented Jun 29, 2023

Hey @AsterDY, sonic is actually an indirect dependency of https://github.com/cloudwego/hertz so we're not using sonic directly as far as I know. However, our build system is building all dependencies (direct or transitive) with the latest version of go (1.21). We see failures when building the whole sonic repository (Bazel is building all packages) and notice a failure in the loader package.

I see similar issues in the hertz library:

@GuangmingLuo, let me get back to you after checking in with my team.

@r-hang
Copy link
Author

r-hang commented Jul 5, 2023

Hey @liuq19 @AsterDY, any updates on this?

@zhangguanzhang
Copy link

any update?

@AsterDY
Copy link
Collaborator

AsterDY commented Aug 1, 2023

I am confused about "our build system is building all dependencies (direct or transitive) "? latest sonic version fallback to encoding/json on Go1.21, thus it won't use sonic/loader at all —— so I don't understand how can you make this error. Can you give me some reproducible codes?

@AsterDY
Copy link
Collaborator

AsterDY commented Aug 1, 2023

BTW, supporting for Go1.21 in on the way branch

@AsterDY
Copy link
Collaborator

AsterDY commented Aug 10, 2023

resolved by #493

@AsterDY AsterDY closed this as completed Aug 10, 2023
@GuangmingLuo
Copy link
Member

GuangmingLuo commented Aug 17, 2023

Hey @AsterDY, sonic is actually an indirect dependency of https://github.com/cloudwego/hertz so we're not using sonic directly as far as I know. However, our build system is building all dependencies (direct or transitive) with the latest version of go (1.21). We see failures when building the whole sonic repository (Bazel is building all packages) and notice a failure in the loader package.

I see similar issues in the hertz library:

@GuangmingLuo, let me get back to you after checking in with my team.

Please to leave a use case message to support our work. Thanks~ @r-hang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants