Skip to content

Commit

Permalink
Update HDF5_jll compat to 1.14, bump version number (#1054)
Browse files Browse the repository at this point in the history
* Update HDF5_jll compat to 1.14, bump version number

* SZIP test is no longer broken in HDF5_jll 1.14 and beyond

* Fix formatting

* Fix library version detection and conversion up to 1.16
  • Loading branch information
mkitti committed Apr 27, 2023
1 parent cdcaba5 commit c65ac25
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
Compat = "3.1.0, 4"
HDF5_jll = "~1.10.5, ~1.12.0"
HDF5_jll = "~1.10.5, ~1.12.0, ~1.14.0"
Requires = "1.0"
julia = "1.3"

Expand Down
4 changes: 3 additions & 1 deletion src/api/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ const H5F_ACC_SWMR_READ = 0x0040
H5F_LIBVER_V18 = 1
H5F_LIBVER_V110 = 2
H5F_LIBVER_V112 = 3
H5F_LIBVER_NBOUNDS = 4
H5F_LIBVER_V114 = 4
H5F_LIBVER_V116 = 5
H5F_LIBVER_NBOUNDS = 6
end
# H5F_LIBVER_LATEST defined in helpers.jl

Expand Down
4 changes: 4 additions & 0 deletions src/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,8 @@ end
libver_bound_to_enum(val::Integer) = val
libver_bound_to_enum(val::API.H5F_libver_t) = val
function libver_bound_to_enum(val::VersionNumber)
val >= v"1.16" ? API.H5F_LIBVER_V116 :
val >= v"1.14" ? API.H5F_LIBVER_V114 :
val >= v"1.12" ? API.H5F_LIBVER_V112 :
val >= v"1.10" ? API.H5F_LIBVER_V110 :
val >= v"1.8" ? API.H5F_LIBVER_V18 :
Expand All @@ -715,6 +717,8 @@ function libver_bound_from_enum(enum::API.H5F_libver_t)
enum == API.H5F_LIBVER_V18 ? v"1.8" :
enum == API.H5F_LIBVER_V110 ? v"1.10" :
enum == API.H5F_LIBVER_V112 ? v"1.12" :
enum == API.H5F_LIBVER_V114 ? v"1.14" :
enum == API.H5F_LIBVER_V116 ? v"1.16" :
error("Unknown libver_bound value $enum")
end
libver_bound_from_enum(enum) = libver_bound_from_enum(API.H5F_libver_t(enum))
Expand Down
5 changes: 4 additions & 1 deletion test/filter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ using HDF5.Filters: ExternalFilter, isavailable, isencoderenabled, isdecoderenab
@test HDF5.API.h5z_filter_avail(HDF5.API.H5Z_FILTER_NBIT)
@test HDF5.API.h5z_filter_avail(HDF5.API.H5Z_FILTER_SCALEOFFSET)
@test HDF5.API.h5z_filter_avail(HDF5.API.H5Z_FILTER_SHUFFLE)
@static if Sys.iswindows() || VERSION v"1.6"
@static if Sys.iswindows() ||
VERSION v"1.6" ||
HDF5.API.h5_get_libversion() >= v"1.14.0"
# SZIP via libaec_jll should be available in HDF5_jll 1.14 builds and beyond
@test HDF5.API.h5z_filter_avail(HDF5.API.H5Z_FILTER_SZIP)
elseif HDF5.API.h5_get_libversion() >= v"1.12.0"
# These are missing in the macOS and Linux JLLs for h5 version 1.12+
Expand Down
6 changes: 5 additions & 1 deletion test/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ using Test
@test dapl.virtual_prefix == "virtual"
# We probably need to actually use a virtual dataset
@test_broken dapl.virtual_printf_gap == 2
@test_broken dapl.virtual_view == :last_available
if HDF5.API.h5_get_libversion() >= v"1.14.0"
@test dapl.virtual_view == :last_available
else
@test_broken dapl.virtual_view == :last_available
end

@test acpl.char_encoding == :utf8

Expand Down

0 comments on commit c65ac25

Please sign in to comment.