JuliaIO / BSON.jl

Other
157 stars 39 forks source link

julia 1.7: mutable field fix #99

Closed daviehh closed 2 years ago

daviehh commented 3 years ago

Julia 1.7 changed T.mutable: this field no longer exists:

julia> Int64.mutable
ERROR: type DataType has no field mutable
Stacktrace:
 [1] getproperty(x::Type, f::Symbol)
   @ Base ./Base.jl:28
 [2] top-level scope
   @ REPL[1]:1

Therefore, writing to bson files fails in julia 1.7/nightly.

In 1.7, there's now a function ismutabletype. This PR will use Base.ismutabletype for julia >1.7 and use T.mutable otherwise. This same approach is used in JLD2.jl here

ps. the CI roundtrip_equal(Tuple) error seems to be caused by something else...

DilumAluthge commented 3 years ago

Bump @CarloLucibello @DhairyaLGandhi

mauro3 commented 3 years ago

I built on top of this PR in PR #103.