-
Notifications
You must be signed in to change notification settings - Fork 142
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
write(fh,"A",A,"B",B) fails on 1.3.0 #599
Comments
sigh this was broken by https://github.com/JuliaIO/HDF5.jl/pull/558/files I tried to see if there was a simple fix, but it's not so simple with the current API... |
I'm not sure if @kleinhenz has some thoughts on this. It's pretty tricky to try to fix with how the api is currently setup. |
Just to be sure we're talking about the same thing the error I get is
I don't think it's #558. I can reproduce at v0.12.1 (the tag before #558 was merged). foo(name1::String, val1, name2::String, val2, nameval...) = println("foo1")
foo(name::String, data::Union{AbstractArray{T}, T}, plists...) where {T <: Number} = println("foo2")
foo("A", 1, "B", 2) reproduces the change in behavior between 1.2 and 1.3 for me (1.2 prints foo1, 1.3 raises method ambiguity error). I'm not an expert on how the type system works so I'm not sure exactly what to make of this. Is this a regression in 1.3? Are method specificity rules expected to be stable? I guess in 1.2 exactly matching |
what about function write(parent::Union{HDF5File, HDF5Group}, data::Vararg{Pair{String, T}}) where T
for (name, val) in data
write(parent, name, val)
end
end for the generic write function? Then the call would be The other option would be to have a wrapper type for the property lists instead of taking plist... directly, but that seems probably more disruptive. |
apologies @kleinhenz I didn't mean to single your PR out. Clearly this wasn't related to that PR, and I mistakenly thought it did. Your right, method specificity rules seemed to have changed between 1.2 and 1.3 (this was probably intentionally to fix 'other bugs'). |
Yeah your two options were also the only ways I could think up to fix this issue.
wrapping |
but it works in 1.2.0. In contrast,
still works.
Edit: on Windows 10 (64)
The text was updated successfully, but these errors were encountered: