-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
Add simple Zeitwerk integration #1100
Add simple Zeitwerk integration #1100
Conversation
dc846b1
to
f24a5d0
Compare
That is all? Man, I do not know the details but this patch tells me the work behind this integration is really good 💯. |
@fxn Thanks for taking a look! ❤️ As my latest commit shows (c35c7ae), there's still a little to come, but I hope the integration picture overall won't need to become much more complex than it is now. If there's any necessary part of integration that you think we might be overlooking, would definitely appreciate any pointers! One thing I'm keeping in mind is enabling reloading when the application is in development mode, but I think I might consider that in another PR, after all the basic integration is done and shown to be working smoothly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timriley Great to see this to happen! 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things are getting real 💪🏻
This is just a hack to start with
This will opt the application out from any autoloading behavior
This allows us to use the safe navigation operator when working with the autoloader elsewhere in the code
02d1563
to
0fb38bf
Compare
🎉 |
Set up autoloading by default for Hanami 2 applications.
This uses Zeitwerk and dry-system's autoloading support.
To support this, we do the following:
Hanami.application.configuration.autoloader
Loader::Autoloading
and disable the containers' component dirs from being added to the load path#setup
on the loader, effectively finalizing its configWe also support opting out of autoloading entirely by setting
Hanami.application.configuration.autoloader
tonil
orfalse
.