-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Make Rust/C++ FFI error handling robust (#2667)
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Introduces a mechanism to propagate errors from C++ into rust by catching errors in the bindings and then populating a thread_local variable. - Build the c++ code automatically on change - Propagate new errors up through the codebase - Coalesce shared functionality in rust hnsw tests - the c++ bindings were creating errors, but not throwing them, this path is purely defensive so it was never excercised, this fixes that. - New functionality - None ## Test plan *How are these changes tested?* Added a new test to test add() errors - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes None
- Loading branch information
Showing
7 changed files
with
367 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.