-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
runtime: remove github.com/cloudwego/frugal
from linkname comment
#69222
Comments
However, the code of people using one of the older versions of frugal must be kept running. Therefore, it doesn’t matter if newer versions no longer use the linknames. |
Not necessarily, all the dependencies that didn't make the cut to be special cased cannot be built with the most recent release. This won't be any different, except there's an upgrade path that will resolve the issue. |
@gophun Yes, but people who using the old versions can only compile with the old Go version which may already deprecated by the Go team, and users should not report any issues to @seankhliao not sure if I understand what you mean. |
Why? You can expect old programs with old dependency versions to compile and run with the latest Go version. |
Yes, but frugal made the cut to be special cased, because too many projects depend on the problematic versions directly or indirectly. These projects can't be expected to upgrade all of a sudden just because there is a new version of frugal. The special cases shouldn't be removed unless there is evidence that usage of old frugal versions has decreased enough to ensure that the Go ecosystem won't break significantly with a current Go version. |
@xiaost Thanks for working to remove the linkname references. I would encourage you to send a patch to the main Go repo removing frugal from the lists it should no longer be on. See https://go.dev/doc/contribute. Thanks. |
Change https://go.dev/cl/609918 mentions this issue: |
Dear Go Team,
I'm one of the maintainers of
github.com/cloudwego/frugal
Recently, we have become aware of issues related to the misuse of linknames in the Go runtime (#67401).
Previously
frugal
is a JIT solution for decoding apache thrift protocol which widely used in our company,but it involved binding to various components of the Go runtime, and it has made the project difficult to maintain as Go continues to evolve.
To address this, we have implemented a new reflection-based version of frugal that no longer relies on numerous runtime functions and structures. We would greatly appreciate it if Go could consider removing
frugal
from the "hall of shame" comment in the runtime package.Starting from Go 1.24, we will fully deprecate the JIT implementation,
and we have already added build tag to facilitate this transition.
However, we regret to inform you that we still need to rely on
runtime.mallocgc
for memory allocation when decoding different types. This is the last remaining linkname dependency infrugal
.There are two purposes of using
runtime.mallocgc
:copy
afterruntime.mallocgc
withneedzero=false
for better performance.reflect.MakeSlice
orreflect.New
when handlingunsafe.Pointer
We understand that relying on any linkname function is not an ideal long-term solution,
and we are committed to adopting a better and more compatible approach provided by Go in the future.
attached with the full list that can be removed.
The text was updated successfully, but these errors were encountered: