-
Notifications
You must be signed in to change notification settings - Fork 65
feat: new binding via go:linkname #362
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
base: main
Are you sure you want to change the base?
Conversation
Add [WIP] on your title |
34e32a5
to
98931fc
Compare
4514d3f
to
6b22d5e
Compare
fff38f7
to
bea9104
Compare
bea9104
to
da4fbe0
Compare
otel_importer.go | ||
test/fiberv2/v2.43.0/fiber_http | ||
test/redis/v9.0.5/test_redis_ring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add those test binary here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay, gitignore is somewhat flexible, any unnecessary files generated during the development can be added to it.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #362 +/- ##
==========================================
+ Coverage 83.70% 87.01% +3.31%
==========================================
Files 27 25 -2
Lines 1209 1163 -46
==========================================
Hits 1012 1012
+ Misses 159 113 -46
Partials 38 38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This patch rewrites the code injection mechanism.
We no longer inject by copying code into the user's project and injecting via variable assignment. In the new approach, we will use
go:linkname
for injection. Since the injection is done by the linker through symbol overriding, the hook code is always fully initialized and ready before the target function is called. Therefore, the new implementation eliminates initialization order issues, which is a long-standing pain in older version #48