-
Notifications
You must be signed in to change notification settings - Fork 86
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
Minimal Object Reference Implementation #279
base: master
Are you sure you want to change the base?
Conversation
Added a trait for object references and refactored the StdReference as a newtype (ObjectReference2) and behind the trait so we can support it side by side with the older object references.
This commit represents an MVP for object references. This includes the implementation of Object1 for 1.8 and later, and Object2 for 1.12 and later.
The wrapper to H5RCopy is causing issues in some enviroments. This commit removes it for now as it isn't critical to the basic object implementation.
There appear to be bugs in the v1.12.0 version which certainly break ObjectReference2 is an element in compound type. Other bugs were seen previously as well so this appears to be a more stable option.
Obviously got into a bit of a mess here still so will mark as draft. I thought I had it. One problem is bugs in 1.12.0 with references so now flagged as 1.12.1 required. Another is with the VarLenArray I believe. Going to back out the changes to make them work with Non-Copy types and the ObjectReference2 will just not be supported in them at this point. I've successfully got conda replicating another issue on 1.8 so I'll work on that too! |
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 looks great, just move a couple of structs and this should be ready to merge.
hdf5-types/src/dyn_value.rs
Outdated
@@ -703,6 +703,7 @@ impl<'a> DynValue<'a> { | |||
FixedUnicode(_) => DynFixedString::new(buf, true).into(), | |||
VarLenAscii => DynVarLenString::new(buf, false).into(), | |||
VarLenUnicode => DynVarLenString::new(buf, true).into(), | |||
Reference(_x) => todo!(), |
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.
Should we support this?
I think we can lift the restriction of |
Yes I think there is a way - the main issue is the ptr lifetime and implementing our own drop routine. I've been trying to think if there is a way to treat it as a slice so we get some for free but I guess it will always have the problem of needing to be C compatible with the HDF5 library. I'm happy to have a go with this as well but didn't want to grow this PR any bigger! |
I'm more than OK with keeping this PR small. We have #232 which attempts to solve the |
Co-authored-by: Magnus Ulimoen <[email protected]> Signed-off-by: James McNally <[email protected]>
Just wanted to check what was blocking this and #243 as they will start blocking my project. Happy to do work here to unblock it. I see the falling brew install was removed in another PR anyway. I can try and triage the MinGW issue too |
This PR includes changes to support object references as requested in #98.
It adds ObjectReference1 as pre-1.12 object references and ObjectReference2 as the new reference types based on the STD_REF type.
I've tried to make this useful without being too large and can build on it further.
Key questions for me are around the terminology as I'm quite new to HDF5 - let me know if that makes sense.
Other possible issues to consider: