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

Can't get Revise to work with HDF5 #364

Closed
musm opened this issue Sep 20, 2019 · 7 comments
Closed

Can't get Revise to work with HDF5 #364

musm opened this issue Sep 20, 2019 · 7 comments

Comments

@musm
Copy link
Contributor

musm commented Sep 20, 2019

HDF5 uses a lot of try finally statements.
I'm on Julia 1.3

julia -i -e 'import Pkg; Pkg.activate(\"dev\",shared=true); using Revise; using HDF5

Modifying _getindex within HDF5.jl source files by adding @show statements doesn't get updated. Say for example you add @show indices on https://github.com/JuliaIO/HDF5.jl/blob/master/src/HDF5.jl#L1781
it simply doesn't get updated.

@timholy
Copy link
Owner

timholy commented Sep 20, 2019

Please provide a MWE and I will fix it. (Including file creation or anything else necessary.)

@musm
Copy link
Contributor Author

musm commented Sep 20, 2019

I'm not really sure what I could provide as a MWE without HDF5.jl since I encountered the problem with this package.

@timholy
Copy link
Owner

timholy commented Sep 20, 2019

No, I just mean

using HDF5
h5open("blahblah.h5", "w") do
   # whatever
end
fl = h5open("blahblah.h5", "r")
x = fl[name]

or whatever.

@musm
Copy link
Contributor Author

musm commented Sep 22, 2019

using Revise
using HDF5

f = tempname()
A = copy(reshape(1:240, 15, 8,2))
h5write(f, "A", A)
h5read(f, "A", (1:10,5,1))

# modify  L1776 in `HDF5.jl`, say by adding `@show "test"`

h5read(f, "A", (1:10,5,1))

# does not print the `"test"` 

@musm
Copy link
Contributor Author

musm commented Sep 23, 2019

I'm not sure if this makes a difference but I'm using julia 1.3 rc2

@timholy
Copy link
Owner

timholy commented Sep 25, 2019

Thanks for the example. I can replicate the problem, and indeed it's the kind of test case I've long been expecting to come across my desk. I will try to fix this the "right" way (#255), which will be slow but also involves fixing or mitigating #326 and #249.

In the short term you can use the Revise 1.x branch, pkg> add [email protected]. Sorry for any inconvenience.

@timholy
Copy link
Owner

timholy commented Nov 5, 2019

Closed by #255

@timholy timholy closed this as completed Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants