diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 392a42ce..850ebeec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: lcov.info diff --git a/CHANGELOG.md b/CHANGELOG.md index f2f7e872..ab7f49d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.9 + - fix regression for `Union{Bool,Nothing}` array elements (#617) + - fix printing issue in `printtoc` + ## 0.5.8 - Stop using `Base.module_keys` as it is removed on nightly diff --git a/Project.toml b/Project.toml index 71b75d7b..a86f6234 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "JLD2" uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -version = "0.5.8" +version = "0.5.9" [deps] FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" diff --git a/src/JLD2.jl b/src/JLD2.jl index cc868753..3d6d45c9 100644 --- a/src/JLD2.jl +++ b/src/JLD2.jl @@ -462,8 +462,10 @@ Prints an overview of the contents of `f` to the `IO`. Use the optional `numlines` parameter to restrict the amount of items listed. """ printtoc(f::JLDFile; kwargs...) = printtoc(Base.stdout, f; kwargs...) -printtoc(io::IO, f::JLDFile; numlines = typemax(Int64)) = +function printtoc(io::IO, f::JLDFile; numlines = typemax(Int64)) show_group(io, f.root_group, numlines, " ", true) + return nothing +end diff --git a/src/inlineunion.jl b/src/inlineunion.jl index cba8aa84..cce81247 100644 --- a/src/inlineunion.jl +++ b/src/inlineunion.jl @@ -52,9 +52,9 @@ end # except for the ReadRepresentation and the very last line where the data is # converted back into a Union Array function read_array(f::JLDFile, dataspace::ReadDataspace, - rr::MappedRepr{InlineUnionEl{T1,T2},RR}, layout::DataLayout, + rr::ReadRepresentation{InlineUnionEl{T1,T2},RR}, layout::DataLayout, filters::FilterPipeline, header_offset::RelOffset, - attributes::Union{Vector{ReadAttribute},Nothing}) where {T1, T2,RR} + attributes::Union{Vector{ReadAttribute},Nothing}) where {T1,T2,RR} io = f.io ndims, offset = get_ndims_offset(f, dataspace, attributes) seek(io, offset) diff --git a/test/inlineunion.jl b/test/inlineunion.jl index 5657b918..6a360762 100644 --- a/test/inlineunion.jl +++ b/test/inlineunion.jl @@ -40,4 +40,8 @@ struct Bparam{T}; x::T; end u = Union{Float32, Missing}[rand(5,5);] save(fn, "u", u) @test u == load(fn, "u") + + u = Union{Bool, Nothing}[true, nothing, false] + save(fn, "u", u) + @test u == load(fn, "u") end