You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a proper way to do that ? I don't understand at which step Spring::Application#preload is called but maybe it's a good idea to watch only files loaded before Rails.application.config.after_initialize or Rails.application.config.to_preload.
The text was updated successfully, but these errors were encountered:
It happens before even the application is loaded, so we can't implement any logic that depends on what happened in the application. Unfortunately there is no way to do this. We could have a Watcher#remove method so you could configure srping to stop watching a file.
I tried to do Spring.watcher.files.reject! { |k, v| $LOADED_FEATURES.include?(k) } but it's not enough because spring is running in a different thread. I'm not sure how to do.
During the initialization of a Rails app, some files are required and added to
$LOADED_FEATURES
so, when they are changed, the whole app reloads.I want to avoid that and I this commenting the line that add them to the watcher fix my issue.
Is there a proper way to do that ? I don't understand at which step
Spring::Application#preload
is called but maybe it's a good idea to watch only files loaded beforeRails.application.config.after_initialize
orRails.application.config.to_preload
.The text was updated successfully, but these errors were encountered: