-
Notifications
You must be signed in to change notification settings - Fork 71
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
Deprecate exists to haskey and names to keys and bump minor version in prep for HDF5 release #156
Conversation
I think we should also do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With names
-> keys
, I think we're good to go.
Edit: Wait — we might need to keep the import HDF5.exists
for now to have the deprecated binding be common among MAT and JLD. I'm going to try to test that.\
Edit 2: Yes, with current HDF5, latest JLD, and this branch after pushing my commit:
julia> using JLD, MAT
julia> mfile = matopen("MAT/test/v7/struct.mat")
MAT.MAT_v5.Matlabv5File(IOStream(<file MAT/test/v7/struct.mat>), false, #undef)
julia> exists(mfile, "s")
ERROR: MethodError: no method matching exists(::MAT.MAT_v5.Matlabv5File, ::String)
Closest candidates are:
exists(::Union{HDF5.Attributes, HDF5.Dataset, HDF5.Datatype, HDF5.File, HDF5.Group}, ::AbstractString) at deprecated.jl:70
exists(::Union{JLD.JLD00.JldDataset, JLD.JLD00.JldFile, JLD.JLD00.JldGroup}, ::String) at /home/justin/.julia/dev/JLD/src/JLD00.jl:1147
exists(::Union{JLD.JldDataset, JLD.JldFile, JLD.JldGroup}, ::String) at /home/justin/.julia/dev/JLD/src/JLD.jl:1324
Stacktrace:
[1] top-level scope
@ REPL[8]:1
so it looks like we'll need to deprecate upon the imported deprecated binding, and then coordinate releases of HDF5, JLD, and MAT that all simultaneously remove the deprecation. Unfortunately, that means either a very short deprecation period for JLD and MAT, or we wait a bit on the HDF5 side.
I checkout out this MAT branch and the JLD branch with the depwarn removal.
I think the only thing we need to ensure is that we tag JLD and MAT at the same time with the removal, unless I'm missing something. |
Oh I see, they would both export their own And this would only be a problem for users importing both the |
I think that accidentally works — note that it says If both MAT and JLD are upgraded simultaneously, then there's no functional problem (though still a confusing error message), but if you get a mismatch of MAT v0.10 (next release) and JLD v0.11 (current latest), then the deprecations break, I think. |
Yeah, we're both replying about the same time but reaching the same conclusion — I think the key is to maintain compatibility across any valid combination of package versions, which could include with and without deprecations in MAT and JLD (or vice versa), respectively. (Though both package restricting themselves to HDF5 v0.15 on a release would serve to synchronize package compatibility "eras". The need for a deprecation period makes that probably undesirable for the next release.) |
Ok so if I understand things correctly. And correct me if this is wrong, but our options are: option 1:
option 2:
If this is correct, my preference is for option 1, as it seems to require fewer steps where one could screw up in the process or forget by the team someone gets to all the stages along the timeline. Open to either option, regardless. |
The compat bounds in
Option 3:
|
Oh your right. It's the caret specifier and for packages without a major digit it's the same as tilde, so we should be good. |
Do you have a preference for which option? I think Option 3 or Option 1 in order of preference. |
No description provided.