JuliaIO / HDF5.jl

Save and load data in the HDF5 file format from Julia
https://juliaio.github.io/HDF5.jl
MIT License
380 stars 138 forks source link

Fix variable length strings as attributes #1130

Closed simonbyrne closed 6 months ago

simonbyrne commented 8 months ago

Fixes #1129

mkitti commented 7 months ago

Does anyone know what's going up with nightly here?

mkitti commented 7 months ago
plain: Error During Test at /home/runner/work/HDF5.jl/HDF5.jl/test/plain.jl:24
  Got exception outside of a @test
  conversion to pointer not defined for Vector{HDF5.API.hvl_t}
  Stacktrace:
    [1] error(s::String)
      @ Base ./error.jl:35
    [2] unsafe_convert(::Type{Ptr{HDF5.API.hvl_t}}, a::Vector{HDF5.API.hvl_t})
      @ Base ./pointer.jl:67
    [3] unsafe_convert(::Type{Ptr{Nothing}}, a::Vector{HDF5.API.hvl_t})
      @ Base ./pointer.jl:66
    [4] h5d_write(dataset_id::HDF5.Dataset, mem_type_id::HDF5.Datatype, mem_space_id::Int64, file_space_id::Int64, xfer_plist_id::HDF5.DatasetTransferProperties, buf::HDF5.VLen{HDF5.ASCIIChar})
      @ HDF5.API ~/work/HDF5.jl/HDF5.jl/src/api/functions.jl:908
    [5] write_dataset(dset::HDF5.Dataset, memtype::HDF5.Datatype, x::HDF5.VLen{HDF5.ASCIIChar}, xfer::HDF5.DatasetTransferProperties)
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/datasets.jl:488
    [6] write_dataset(parent::HDF5.File, name::String, data::HDF5.VLen{HDF5.ASCIIChar}; pv::@Kwargs{})
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/datasets.jl:320
    [7] write_dataset(parent::HDF5.File, name::String, data::HDF5.VLen{HDF5.ASCIIChar})
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/datasets.jl:315
    [8] macro expansion
      @ ~/work/HDF5.jl/HDF5.jl/test/plain.jl:88 [inlined]
    [9] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.11/Test/src/Test.jl:1598 [inlined]
   [10] top-level scope
      @ ~/work/HDF5.jl/HDF5.jl/test/plain.jl:27
   [11] include(fname::String)
      @ Base.MainInclude ./client.jl:497
   [12] macro expansion
      @ ~/work/HDF5.jl/HDF5.jl/test/runtests.jl:36 [inlined]
   [13] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.11/Test/src/Test.jl:1598 [inlined]
   [14] top-level scope
      @ ~/work/HDF5.jl/HDF5.jl/test/runtests.jl:35
   [15] include(fname::String)
      @ Base.MainInclude ./client.jl:497
   [16] top-level scope
      @ none:6
   [17] eval
      @ Core ./boot.jl:418 [inlined]
   [18] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:291
   [19] _start()
      @ Base ./client.jl:568
abstract arrays: Error During Test at /home/runner/work/HDF5.jl/HDF5.jl/test/plain.jl:674
  Got exception outside of a @test
  conversion to pointer not defined for Base.ReinterpretArray{UInt8, 1, Bool, Vector{Bool}, false}
  Stacktrace:
    [1] error(s::String)
      @ Base ./error.jl:35
    [2] unsafe_convert(::Type{Ptr{UInt8}}, a::Base.ReinterpretArray{UInt8, 1, Bool, Vector{Bool}, false})
      @ Base ./pointer.jl:67
    [3] unsafe_convert(::Type{Ptr{Nothing}}, a::Base.ReinterpretArray{UInt8, 1, Bool, Vector{Bool}, false})
      @ Base ./pointer.jl:66
    [4] h5d_write(dataset_id::HDF5.Dataset, mem_type_id::HDF5.Datatype, mem_space_id::Int64, file_space_id::Int64, xfer_plist_id::HDF5.DatasetTransferProperties, buf::Base.ReinterpretArray{UInt8, 1, Bool, Vector{Bool}, false})
      @ HDF5.API ~/work/HDF5.jl/HDF5.jl/src/api/functions.jl:908
    [5] write_dataset(dataset::HDF5.Dataset, memtype::HDF5.Datatype, buf::Base.ReinterpretArray{UInt8, 1, Bool, Vector{Bool}, false}, xfer::HDF5.DatasetTransferProperties)
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/datasets.jl:523
    [6] write_dataset(dataset::HDF5.Dataset, memtype::HDF5.Datatype, buf::Base.ReinterpretArray{UInt8, 1, Bool, Vector{Bool}, false})
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/datasets.jl:521
    [7] write_dataset(parent::HDF5.File, name::String, data::Base.ReinterpretArray{UInt8, 1, Bool, Vector{Bool}, false}; pv::@Kwargs{})
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/datasets.jl:320
    [8] write_dataset(parent::HDF5.File, name::String, data::Base.ReinterpretArray{UInt8, 1, Bool, Vector{Bool}, false})
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/datasets.jl:315
    [9] write(parent::HDF5.File, name::String, data::Base.ReinterpretArray{UInt8, 1, Bool, Vector{Bool}, false}; pv::@Kwargs{})
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/datasets.jl:342
   [10] (::var"#37#40")(f::HDF5.File)
      @ Main ~/work/HDF5.jl/HDF5.jl/test/plain.jl:681
   [11] (::HDF5.var"#17#18"{HDF5.HDF5Context, @Kwargs{}, var"#37#40", HDF5.File})()
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/file.jl:101
   [12] task_local_storage(body::HDF5.var"#17#18"{HDF5.HDF5Context, @Kwargs{}, var"#37#40", HDF5.File}, key::Symbol, val::HDF5.HDF5Context)
      @ Base ./task.jl:299
   [13] h5open(::var"#37#40", ::String, ::Vararg{String}; context::HDF5.HDF5Context, pv::@Kwargs{})
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/file.jl:96
   [14] h5open(::Function, ::String, ::String)
      @ HDF5 ~/work/HDF5.jl/HDF5.jl/src/file.jl:94
   [15] macro expansion
      @ ~/work/HDF5.jl/HDF5.jl/test/plain.jl:679 [inlined]
   [16] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.11/Test/src/Test.jl:1598 [inlined]
   [17] top-level scope
      @ ~/work/HDF5.jl/HDF5.jl/test/plain.jl:677
   [18] include(fname::String)
      @ Base.MainInclude ./client.jl:497
   [19] macro expansion
      @ ~/work/HDF5.jl/HDF5.jl/test/runtests.jl:36 [inlined]
   [20] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.11/Test/src/Test.jl:1598 [inlined]
   [21] top-level scope
      @ ~/work/HDF5.jl/HDF5.jl/test/runtests.jl:35
   [22] include(fname::String)
      @ Base.MainInclude ./client.jl:497
   [23] top-level scope
      @ none:6
   [24] eval
      @ Core ./boot.jl:418 [inlined]
   [25] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:[291](https://github.com/JuliaIO/HDF5.jl/actions/runs/6724886980/job/18278119057?pr=1130#step:5:294)
   [26] _start()
      @ Base ./client.jl:568
ericphanson commented 5 months ago

can a new release be tagged with this fix? 🙏

ericphanson commented 3 months ago

bump :)

mkitti commented 3 months ago

I think it might be easier to back port this to the 0.17 branch. I will work on that today.

mkitti commented 3 months ago

I released HDF5.jl 0.17.2