-
Notifications
You must be signed in to change notification settings - Fork 18
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
Remove fastpath and unsafe variants #14
Conversation
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.
Could yout point me towards which files remove unsafe?
My understanding is that fastpath and unsafe are controlled by build flags; I see the fastpath being disabled in fast-path.not.go
but unsure where to look for the unsafe
@kisunji It's worth noting that fastpath and unsafe are the defaults, so if you include |
Ah I see it now, thanks. Will your refactors make it difficult to pull more upstream changes? Might not be a huge cost in the end. |
Yes, this will make it hard to pull in upstream changes. Really, at this point, we have effectively diverged with upstream, and this fork should focus more on safely supporting the current msgpack (and JSON for Nomad) formats, and drop everything else. If folks want to have the newer features and performance of the upstream package, then they should use the upstream package. :) |
The fastpath and unsafe variants rely on particular values for Go internals and a lot of unsafe assumptions about types, functions, strings, arrays, etc.
We are not committed to maintaining these dangerous code paths, so it is safer to remove them altogether, and rely on the "not unsafe" and slow paths.
This will make this package a bit slower, but also a much smaller dependency, since the fastpath generated code is extremely large.