Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Julia 1.11 nightly to tests #1146

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
version:
- '1.6'
- '1'
- '1.11-nightly'
- 'nightly'
os:
- ubuntu-latest
Expand Down
14 changes: 14 additions & 0 deletions src/datasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,20 @@ function write_dataset(
end
end
end

function write_dataset(
dataset::Dataset,
memtype::Datatype,
buf::Base.ReinterpretArray,
xfer::DatasetTransferProperties=dataset.xfer
) where {T}
# We cannot obtain a pointer of a ReinterpretArrayin Julia 1.11 and beyond
# https://github.com/JuliaLang/julia/issues/51962
buf_copy = copy(buf)
@assert !(typeof(buf_copy) <: Base.ReinterpretArray) "Copying $(typeof(buf)) resulted in another Base.ReinterpretArray"
write_dataset(dataset, memtype, buf_copy, xfer)
end

function write_dataset(
dataset::Dataset,
memtype::Datatype,
Expand Down
9 changes: 7 additions & 2 deletions test/virtual_dataset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ using Test, HDF5
virtual=[HDF5.VirtualMapping(vspace, "./sub-%b.hdf5", "x", srcspace)]
)

@test size(d) == (3, 2)
@test read(d) == hcat(fill(1.0, 3), fill(2.0, 3))
if Sys.iswindows()
@test_broken size(d) == (3, 2)
@test_broken read(d) == hcat(fill(1.0, 3), fill(2.0, 3))
else
@test size(d) == (3, 2)
@test read(d) == hcat(fill(1.0, 3), fill(2.0, 3))
end

dcpl = HDF5.get_create_properties(d)

Expand Down
Loading