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

Watch app embedded engine initializers #723

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

andrewn617
Copy link
Contributor

@andrewn617 andrewn617 commented Jul 30, 2024

I want to be able to configure spring's file watcher to watch additional files when booting my app. Specifically, I want to update Rails to watch the config/initializers directory of engines defined within the application, so that spring will automatically reload when updating those initializers like it does with the root config/initializers.

By iterating engine descendants we can watch paths that intersect with Rails.root.

@gmcgibbon gmcgibbon force-pushed the booted-load-hook branch 3 times, most recently from 3dbbbb3 to 7f053a7 Compare August 1, 2024 22:07
@gmcgibbon gmcgibbon force-pushed the booted-load-hook branch 6 times, most recently from b06ccef to 6fc5c12 Compare August 9, 2024 07:05
This will allow embedded engine initializers to reload the application
when changed. Previously, the server would have to be reloaded manually.

Co-Authored-By: Gannon McGibbon <gannon.mcgibbon@gmail.com>
@gmcgibbon gmcgibbon changed the title Create a spring_booted ActiveSupport load hook Watch app embedded engine initializers Aug 9, 2024
@gmcgibbon gmcgibbon merged commit eefc42d into rails:main Aug 9, 2024
8 of 11 checks passed
@gmcgibbon gmcgibbon deleted the booted-load-hook branch August 9, 2024 19:23
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

Successfully merging this pull request may close these issues.

2 participants