feat!(rust/ffi): catch panics at FFI boundary#3819
Conversation
e1f661e to
a2d7fc3
Compare
|
also CC @eitsupi if you're interested |
amoeba
left a comment
There was a problem hiding this comment.
Really nice. I hadn't seen the old behavior so I disabled it and re-ran the new tests and this PR is a big improvement. I had one question and a really tiny nit if you agree.
eitsupi
left a comment
There was a problem hiding this comment.
Great!
I found some points to be improved.
There was a problem hiding this comment.
Perhaps the documentation needs to be updated to state that "AdbcDriverInit is a reserved name" (no longer be able to used after this change), and perhaps the PR should be renamed to feat(rust/ffi)! ... to make it clear that it is a breaking change.
There was a problem hiding this comment.
Ah, I should update that comment...the name should be the latter (a driver should provide both)
|
I think 22b954d needs a slight fix which I'll look at |
This gives a slightly nicer experience than unconditionally crashing the entire program. As with the Go FFI scaffolding, once a driver panics, all further calls to the driver will fail. (Albeit, this is not true for exported readers. We also need our own C Data Interface export shim so we can handle things like exporting ADBC errors through the C Data Interface boundary. Currently, C++ and Go-based drivers can do this.)
Co-authored-by: eitsupi <50911393+eitsupi@users.noreply.github.com>
Co-authored-by: Bryce Mecum <petridish@gmail.com>
Co-authored-by: Bryce Mecum <petridish@gmail.com>
f41b35f to
e3801d0
Compare
This gives a slightly nicer experience than unconditionally crashing the entire program. As with the Go FFI scaffolding, once a driver panics, all further calls to the driver will fail. (Albeit, this is not true for exported readers. We also need our own C Data Interface export shim so we can handle things like exporting ADBC errors through the C Data Interface boundary. Currently, C++ and Go-based drivers can do this.) --------- Co-authored-by: eitsupi <50911393+eitsupi@users.noreply.github.com> Co-authored-by: Bryce Mecum <petridish@gmail.com>
This gives a slightly nicer experience than unconditionally crashing the entire program. As with the Go FFI scaffolding, once a driver panics, all further calls to the driver will fail. (Albeit, this is not true for exported readers. We also need our own C Data Interface export shim so we can handle things like exporting ADBC errors through the C Data Interface boundary. Currently, C++ and Go-based drivers can do this.)