Add soft link and external links in JLD2 #686
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A few words by me: This is the result of a much more refined AI coding experiment. It certainly needs more human review, but sucessfully added new features, refactoring a non-trivial amount of JLD2 internals to enable that. All previous tests still pass and new tests & docs were added. There's quite a bit of security code for detecting if external file links point somewhere malicious. I think it might be better to remove these checks for simplicity. JLD2 struct loading has been shown to allow arbitrary code execution with maliciously prepared doctored files. (also unfixably so)
Here's the AI's PR summary:
Add External Links and Soft Links Support
This PR implements comprehensive external link and soft link support for JLD2, enabling cross-file references and flexible data organization patterns while maintaining full backward compatibility and HDF5 specification compliance.
Features Added
🔗 External Links
🔗 Soft Links
🏗️ Architecture
HardLink,SoftLink,ExternalLinkextendingAbstractLinkAPI
Compatibility
h5dump,h5debug,h5pyjldsave/loadExample Usage
Breaking Changes
None - This is a purely additive feature with full backward compatibility.