-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Reloading functions, but not constants, from packages? #4008
Comments
Seems like the functionality here is achieved through the new |
Please reopen if tweaking |
Perhaps even more relevantly, Julia now has much better smarts about detecting that types haven't changed. Try including a test file like
and then tweak the definition of So yes, this can indeed be closed. Thanks for doing the cleaning! |
However, currently in julia v0.5-rc4 if I put module A
immutable MyType
a::Int
end
f(::MyType) = 1
end in a file and want to change |
@LMescheder I hit the same problem with 0.5, and just wrote ClobberingReload.jl to solve it. It hasn't been tested much yet, but if you want to give it a try, it should solve your problem. Let me know if you have any issues. |
When developing modules/packages,
reload()
is often helpful for testing changes without having to restart the REPL. However, one issue is thatfails, because you have to re-create
myvar
. If you have variables that interact across packages, or take a long time to initialize (e.g., require nontrivial calculation), this can be a bit of a pain.With a bit of social engineering, it seems like it should be possible to support something like
reload("MyModule", constants=false)
. The idea is that packages wanting to support this functionality would be organized something like this:From this gist, here's a demo session:
The text was updated successfully, but these errors were encountered: