diff --git a/CHANGELOG.md b/CHANGELOG.md index 48c32809..f2f7e872 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.5.8 + - Stop using `Base.module_keys` as it is removed on nightly + ## 0.5.7 - Fix edge case for uninitialized Vlens diff --git a/Project.toml b/Project.toml index 00cad207..71b75d7b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "JLD2" uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -version = "0.5.7" +version = "0.5.8" [deps] FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" diff --git a/src/data/reconstructing_datatypes.jl b/src/data/reconstructing_datatypes.jl index 044d75b6..11acf5cd 100644 --- a/src/data/reconstructing_datatypes.jl +++ b/src/data/reconstructing_datatypes.jl @@ -308,9 +308,7 @@ function _resolve_type(rr::MappedRepr{T,DataTypeODR}, hasparams::Bool, params) where T parts = split(mypath, '.') - modules = vcat([Main], collect(keys(Base.module_keys))) - unique!(modules) - for mod in modules + for mod in values(Base.loaded_modules) resolution_attempt = _resolve_type_singlemodule(rr, mod, parts, diff --git a/src/io/dataio.jl b/src/io/dataio.jl index 3799d4ab..933131ed 100644 --- a/src/io/dataio.jl +++ b/src/io/dataio.jl @@ -158,10 +158,10 @@ function write_data(io::MemoryBackedIO, f::JLDFile, data::Array, odr, ::Referenc nothing end -function write_data(io::MemoryBackedIO, f::JLDFile, data::Array, odr, ::HasReferences, wsession::JLDWriteSession) +function write_data(io::MemoryBackedIO, f::JLDFile, data::Array, odr::ODR, ::HasReferences, wsession::JLDWriteSession) where ODR ensureroom(io, odr_sizeof(odr) * length(data)) cp = IndirectPointer(io) - + for i = eachindex(data) if isassigned(data, i) h5convert!(cp, odr, f, data[i], wsession) @@ -273,4 +273,4 @@ function read_array!(v::Array{T}, f::JLDFile{MmapIO}, ::SameRepr{T}) where T end io.curptr = inptr + nb v -end \ No newline at end of file +end diff --git a/test/modules.jl b/test/modules.jl index 1389c69b..1efe8f43 100644 --- a/test/modules.jl +++ b/test/modules.jl @@ -21,7 +21,7 @@ S = BType(x) end @testset "name collisions" begin - mods = collect(keys(Base.module_keys)) + mods = collect(values(Base.loaded_modules)) # use whichever module would not be found first in a linear search M = findfirst(==(A), mods) < findfirst(==(B), mods) ? B : A x = M.SameNameType(42)