-
Notifications
You must be signed in to change notification settings - Fork 300
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
Hot reload on save, only if the current file had changes. #3995
Comments
I'm not sure I fully understand the request here. By incremental do you mean while you're making changes, or that you press Save a lot even when not making changes? Having explicit saves (even when no changes) trigger a reload is useful when using auto-save, as the hot-reload-on-auto-save can be disabled (so it doesn't trigger lots), but you can use Ctrl+S as a way to force a reload. It's possible to add a new setting to control this, but I'd like to be sure I understand exactly what the user case first. Thanks! |
By this I mean I make regular saves in very small increments by habit (and I'm sure I can vouch for many others who do the same). An automatic hot-reload-on-save is good but that should only occur if a file has indeed been saved, otherwise it's pointless to trigger a hot-reload when the latest changes have already been pushed. This is how emacs-lsp/dart-lsp behaves which is a small thing but caught my attention when trying out dart-code recently. The options for dart-code Perhaps |
Is this while you're reviewing/reading code? Or while you're doing something else? I'd like to understand the situations in which this happens as it may affect the solution (for example I'm wondering whether it would be best to support it for both Thanks! |
Good question, and yes it could be either while reading or as I'm working, I'm constantly triggering saves. As a vim/evil key binds user, this is quite common, if you ever watch a vim user - they'll habitually be pressing Regardless, I feel it doesn't make sense to persistently hot-reload-on-save for either Either way, It makes more sense to me to just hot-reload only once a file has had changes saved that have not already been pushed. That would be regardless of if the save was manual/automatic. Hope that helps |
We do need to support this for I think rather than adding a new setting, I may adjust the options to the existing setting:
The old value of |
Those all look good, each acknowledging the various use cases. |
Hey there, as the title states - It would be nice to have the option to only hot reload on save; when the current file had changes and was indeed saved.
The problem is 1. An unnecessary hot reload is triggered and 2. the debug console is polluted in hot reload logging.
What happens currently is that even though a files changes have been saved (the file does not required another save), if we (for whatever reason) save again it will trigger an unnecessary hot reload.
Admiringly, I have a habit of saving incrementally - Vim/Evil users will understand, I'm sure I'm not the only one.
I did try to check to see if such an option exists, but it appears not? Thanks
The text was updated successfully, but these errors were encountered: