Thoughts on addrequire?
JLD supports addrequire to allow folks to ensure that necessary packages are loaded before objects from a JLD file. If you'd support this, I will eventually get around to submitting a PR.
This could actually be really neat!
I just took a look at the implementation in JLD.
I think it could be improved for JLD2:
- Use a
_requiressubgroup that contains entries for every requirement. That avoids having to delete a list over and over again AND it would be readable using tools likeh5dump. - Attach version number of loaded package. This allows for future extension to warn users if there are major version number changes.
f["_requires/DataFrames"] = versionofloadedpackage(DataFrames)
Any progress on this?
Hi @lbenet , there is #377 which implements something like this. The PR has been sitting around unused for a while since I wasn't super convinced, it was optimal but it does work. You are welcome to test and give feedback.