Skip to content
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

Thoughts on addrequire? #39

Open
timholy opened this issue Sep 22, 2017 · 3 comments
Open

Thoughts on addrequire? #39

timholy opened this issue Sep 22, 2017 · 3 comments

Comments

@timholy
Copy link
Member

timholy commented Sep 22, 2017

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.

@JonasIsensee
Copy link
Collaborator

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)

@lbenet
Copy link

lbenet commented Oct 19, 2022

Any progress on this?

@JonasIsensee
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants