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

Changes not updating in a specific function #316

Closed
yha opened this issue Jun 3, 2019 · 4 comments
Closed

Changes not updating in a specific function #316

yha opened this issue Jun 3, 2019 · 4 comments

Comments

@yha
Copy link

yha commented Jun 3, 2019

Reproduced on two different machines with the following:

]dev Plots
In Juno:

using Revise
using Plots
pyplot()

pl = plot(rand(4));
Atom.displayinplotpane(pl)

Insert some printing into prepare_output at .julia/dev/Plots/src/plot.jl:253 and _before_layout_calcs(::Plot{PyPlotBackend}) at .julia/dev/Plots/src/backends/pyplot.jl:955 (both of these are called from Atom.displayinplotpane).
When rerunning, only the first change is reflected. The second one only prints after restarting Julia.

@pfitzseb
Copy link
Collaborator

pfitzseb commented Jun 4, 2019

I think this is happening because of Plots' non-standard code loading for backends. You'll probably need to track those changes explicitly.

@yha
Copy link
Author

yha commented Jun 4, 2019

Yes, it looks like backends/pyplot.jl is dynamically loaded (I had wrongly assumed only PyPlot and dependent modules would be).
But tracking explicitly doesn't seem to help here. The same issue is reproduced with the following code:

using Revise
using Plots
pyplot()

pl = plot(rand(4));
Revise.track(Plots, "$(dirname(pathof(Plots)))/backends/pyplot.jl")
Atom.displayinplotpane(pl)

@timholy
Copy link
Owner

timholy commented Nov 16, 2019

Sorry for the long delay getting to this. I thought it was going to be very tricky, but with your manual track it turns out to have been a stupid relative-path issue with a one-line fix (and as usual a many-line test 😉). See #395 .

This will come out as Revise 2.3.1.

@timholy
Copy link
Owner

timholy commented Nov 16, 2019

You may have seen it, but JuliaPlots/Plots.jl#2250 (comment) lists some options to get Revise to track such files automatically.

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

3 participants