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
I don't think that's a fair comparison. Since the object serialization format is independent of the metadata, that would be more like:
julia> BSON.bson(bson("junk.bson", NamedTuple()))
ERROR: MethodError: no method matching bson(::String, ::NamedTuple{(),Tuple{}})
Closest candidates are:
bson(::String; kws...) at /Users/rory/.julia/packages/BSON/XAts7/src/write.jl:85
bson(::String, ::AbstractDict) at /Users/rory/.julia/packages/BSON/XAts7/src/write.jl:83
Stacktrace:
[1] top-level scope at REPL[2]:1
I suppose we could special case BSON, but that would add extra complexity and prevent us from moving away from BSON for the header information if that was ever a requirement.
Perhaps the understanding is that the serialization applies to the entire dictionary/pairs rather than just the values? JLSO wasn't design that way because we want to have control over object names in order to aid in debugging failed deserializations or partial deserialization of the objects.
However, this works fine:
And the default julia format works.
Looks like
NamedTuple{(),Tuple{}}()
is being called somewhere whereNamedTuple{(),Tuple{}}(())
is wanted.Sorry, but I do have a use case for saving empty named tuples 😄
julia> Pkg.ins
The text was updated successfully, but these errors were encountered: