You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JLD2 does not currently attempt to serialize functions in a way that they can be reconstructed without the source having been loaded (see #13). But this should probably print a warning if f is undefined in the workspace instead of silently dropping it from the tuple.
I expected it to be a ReconstructedType instead of dropped, as in:
using JLD2, FileIO
struct Foo
a
b
c
endf() =2save("test.jld2", "val", Foo(vcat, f, Any[vcat, f]))
using JLD2, FileIO
struct Foo
a
b
c
endload("test.jld2", "val")
>Foo(vcat, JLD2.ReconstructedTypes.###f#665(), Any[vcat, JLD2.ReconstructedTypes.###f#665()])
Another issue, perhaps unsolvable: saving Function[vcat, f] has a problem on reload, because ReconstructedTypes are not Function objects.
The ReconstructedTypes behaviour is great for saving and loading traces in TraceCalls.jl, thank you for JLD2. 👍
The function disappears from the tuple:
The text was updated successfully, but these errors were encountered: