-
Notifications
You must be signed in to change notification settings - Fork 112
Usage outside REPL #194
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
Comments
Did you try it? There's no cost to try 😄. |
Oh, you mean, "can you display the diff"? Yes, but not without editing Revise. If that's all you want to do, you're better off using |
Yes I've tried it and I absolutely love how Revise works in the REPL. Sorry for the phrasing. I'm not interested in the diff. I mean I want the output of the program to change so it executes new code when I edit the other file. Revise works absolutely well when I'm in the REPL and I edit a file between commands. What I'm trying to do here is get it to react to changes while a program is running with a while loop. I want the program to detect and execute the code without having to restart the program so it never leaves the while loop. It just runs the new code inside the modified function.
|
Got it. Just change your loop to while true
Base.invokelatest(hello, "world")
Revise.revise()
end If you're curious, the issue is one regarding "world age". |
That works! Thank you and thanks for pointing me toward World Age. |
Uh oh!
There was an error while loading. Please reload this page.
Does Revise only work in the REPL? The docs say "the changes will be incorporated into the very next command you issue from the REPL."
I'm trying to write a program (ultimately drawing to Canvas) where I want the program to execute changes in a file while the program is still running. For instance look at the following.
Is it possible to run
julia Try.jl
which spins in the while loop printing out forever, then editingExample.jl
and having the main program print out the changed contents?Example.jl
Try.jl
The text was updated successfully, but these errors were encountered: