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

expost API for testing type consistency #46

Open
tpapp opened this issue Oct 24, 2017 · 2 comments
Open

expost API for testing type consistency #46

tpapp opened this issue Oct 24, 2017 · 2 comments

Comments

@tpapp
Copy link

tpapp commented Oct 24, 2017

If a user writes values of a type

struct Foo
    a::Int64
end

and then later redefines the type as

struct Foo
    a::Int64
    b::Int64
end

and reads from a jld2 file, JLD2 (and also, of course, JLD) can catch the inconsistency between the two definitions. It would be great have the API for this exposed, eg as write_type_fingerprint(jldfile, "Foo", Foo) and similarly as a read method.

@JonasIsensee
Copy link
Collaborator

I'm sorry, I don't quite understand what you are suggesting.

@tpapp
Copy link
Author

tpapp commented Jul 17, 2020

A way to detect this situation before reading the data (and throwing an error).

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

2 participants