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

How can I auto reload all the involved modules when the source is changed? #12

Open
rudaoshi opened this issue Apr 25, 2021 · 1 comment

Comments

@rudaoshi
Copy link

I want to auto reload all the involved modules when the source is changed.

How can I do this?

@ArneBachmann
Copy link

Yeah, I think this makes sense whenever I rename functions. I would simply put a @reload at my main function and wish it all works automatically. Module imports, on the other hand, are usually executed at import time once, not on function call.

In the end it's probably more sensible to write an external watcher that kills your process and respawns it whenever a file change has been detected (probably waiting a certain time or waiting for a file system flag).

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