Skip to content

Commit

Permalink
Merge pull request #618 from JuliaIO/dev
Browse files Browse the repository at this point in the history
Version v0.5.9
  • Loading branch information
JonasIsensee authored Nov 19, 2024
2 parents 70f10de + 89d8a39 commit 131d498
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 3 additions & 1 deletion src/JLD2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down
4 changes: 2 additions & 2 deletions src/inlineunion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions test/inlineunion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 comments on commit 131d498

@JonasIsensee
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release Notes:

  • Regression fix for Union-type array elements
  • fix printing issue in printtoc

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/119757

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.9 -m "<description of version>" 131d4985b2e667ee8ac86399c0dead57b56f8c96
git push origin v0.5.9

Please sign in to comment.