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

Feature Request: Option to automatically run revise in a parallel task #816

Open
schlichtanders opened this issue Apr 25, 2024 · 3 comments

Comments

@schlichtanders
Copy link

Hello,
I am using Revise with a Webserver and found this discourse thread with the hint that one needs to execute something on the REPL in order to trigger revise().

It would be great if Revise.jl had a mode where this update is done automatically without the need of another execution in the REPL. This would simplify the workflow massively when working with an ongoing process like a webserver.

@KristofferC
Copy link
Collaborator

@schlichtanders
Copy link
Author

adding an explicit revise() call to the webserver is a workaround, but requires the Webserver package to depend on Revise (even package extensions don't work, as this would involve type piracy against its own main package, which recently got raised to error status in julia 1.10).

Hence, it would be great if the auto updates could be done by Revise itself in an async task.

@timholy
Copy link
Owner

timholy commented Sep 24, 2024

What event would trigger revise in this async task? Would it just be on a timer? The concern I have is that you still probably want to trigger Revise at "appropriate" times. E.g., adding a method

foo(::NewType) = nothing

to src/code.jl before adding

struct NewType end

to src/types.jl is obviously problematic. But developers like me do this all the time (it's a good opportunity to play with your struct before actually defining it), and because Revise currently gets triggered by trying a command at the REPL, it only errors if the developer has genuinely made a mistake, and it probably only happens once. But if it auto-triggers, then perfectly valid developer practices will start throwing errors, and those errors may repeat every second if it's on a timer. This would be extremely annoying.

I recognize that this may perhaps not be what you're asking for, in which case a bit more detail about the request would be very helpful.

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