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

Delay patch finding to before :eager_load! #10

Closed
wants to merge 1 commit into from

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jan 14, 2025

Currently, the Flickwerk initializers run at some time, and that works. However, by fixing them to before: :eager_load!, we make sure they run late enough to know all about all inflections.

Currently, the Flickwerk initializers run at some time, and that works.
However, by fixing them to `before: :eager_load!`, we make sure they run
late enough to know all about all inflections.
Copy link
Collaborator

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the explicitness

@mamhoff
Copy link
Contributor Author

mamhoff commented Jan 22, 2025

The code in the initializers already runs in an app.reloader.to_prepare block, which is exactly when we need it. Adding more explicitness here actually increases the risk of cyclical dependencies in the graph of initializers.

@mamhoff mamhoff closed this Jan 22, 2025
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