JLD2.jl icon indicating copy to clipboard operation
JLD2.jl copied to clipboard

Thoughts on addrequire?

Open timholy opened this issue 8 years ago • 3 comments

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.

timholy avatar Sep 22 '17 08:09 timholy

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 _requires subgroup that contains entries for every requirement. That avoids having to delete a list over and over again AND it would be readable using tools like h5dump.
  • 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)

JonasIsensee avatar Apr 28 '21 12:04 JonasIsensee

Any progress on this?

lbenet avatar Oct 19 '22 00:10 lbenet

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.

JonasIsensee avatar Oct 19 '22 06:10 JonasIsensee