-
Notifications
You must be signed in to change notification settings - Fork 91
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
Field XXX has non-zero size in file, this should not happen #594
Comments
Hm, I actually can't reproduce.. julia> using JLD2
Precompiling JLD2
1 dependency successfully precompiled in 26 seconds. 7 already precompiled.
julia> @enum MyEnum begin
A = 1
end
julia> Base.@kwdef struct KK
enum::MyEnum = A
int::Int = 0
field::Symbol = :KK2
str::String = "jkjk"
end
KK
julia> function JLD2.rconvert(::Type{KK}, deserialized::NamedTuple)
return KK(; deserialized...)
end
julia> save("kk.jld2", Dict("kk" => KK()))
julia> load("kk.jld2"; typemap=Dict("KK" => JLD2.Upgrade(KK)))
Dict{String, Any} with 1 entry:
"kk" => KK(A, 0, :KK2, "jkjk") I am not sure what is going on at your side. What Julia version are you on? |
Hi,
|
Btw, I also get these different messages in 0.5.1 when doing
|
Ok, I found the problem. This bit is expected and also exists on older versions:
|
Cool, thanks! |
On version 0.5.1, when using typemap for upgrades, we get the following message for some kinds of types (for Symbols & enums, but not for Ints and Strings)
Field XXX has non-zero size in file, this should not happen
You can reproduce with this:
The text was updated successfully, but these errors were encountered: