-
Notifications
You must be signed in to change notification settings - Fork 119
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
Split tuples, arrays and the C API off from the records file and refactored them #872
Conversation
504d673
to
39fed97
Compare
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.
This is great, thanks for all the cleanups! I fixed regressions and rebased. In addition to using a 1.48 feature your code is using some other post 1.41 features, so I decided to advance the earliest supported version of Rust to 1.47. I will push that change to this branch once I'm done uploading a new 1.47-based docker image (my upload speed sucks), and testing with it.
$( | ||
impl<T: FromRecord> FromRecord for [T; $length] { | ||
fn from_record(val: &Record) -> Result<Self, String> { | ||
Vec::from_record(val)?.try_into().map_err(|_| { |
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.
This requires Rust 1.48 (https://doc.rust-lang.org/std/primitive.array.html#impl-TryFrom%3CVec%3CT%3E%3E).
I will roll this back to the old implementation.
PS. I noticed that git diff is useless when renaming files is involved. It'd make reviewing a lot easier if changes that involve renaming files were submitted as separate commits to make it easier to identify what's actually changed in the code. |
I'm sorry about that, I thought I had split it into a separate commit |
f7dcc30
to
e476cac
Compare
C API in |
That's very unfortunate, no objections from me |
We have so far maintained compatibility with Rust 1.41+. Newer versions have more and more features that we'd like to use, as well as some that break backwards compatibility. We therefore upgrade our Rust dependency to 1.47. Some earlier versions might still work, but 1.47.0 is going to be the earliest "officially" supported one.
After `record.rs` was split into multiple modules, the C API disappeared from the compiled .so library. This is likely due to this compiler bug: rust-lang/rust#50007 As a workaround until the bug is fixed, we move the API from `record/c_api.rs` to `record/mod.rs`.
e476cac
to
05a471e
Compare
differential_datalog/records.rs
into a moduleRecord
enum