Xavier Noria
Xavier Noria
And if you think about it, that is aligned with the eager loading case. The same warning works, you don't need special logic, because the point is to wait until...
I'll go even further. Let's imagine all the Rails code in the world uses `on_load` and 100% of users depend on it. When should Rails load its components? Now, that...
> Isn't what this warning is trying to do? If users code, or libraries are trying to load Rails owned frameworks before Rails thinks it should loaded, users will see...
Let me draft one possible way to do this. 1. In my view, it does not make sense that an application is booted and Rails is not ready to be...
I suspect there's a bit of confusion here: * In Rake tasks, `config.eager_load` has been `false` by default for a long time. * In older versions, this was overridden by...
I am 👍 on this warning. Indeed, for Zeitwerk, a non-existing directory on setup is an error condition. However, IIRC the reason Rails is not as strict or emits warnings...
Idiomatically, you want to ignore that file. It could done with something like this in Devise (off the top of my head): ```ruby initializer "devise.configure_zeitwerk_if_enabled" do if Rails.autoloaders.zeitwerk_enabled? && !defined?(ActionMailer)...
Oh yes, totally.
The `main` autoloader is setup late in the boot process. An initializer could do something like this (untested) ```ruby if Rails.autoloaders.zeitwerk_enabled? Rails.autoloaders.main.ignore("#{root}/app/mailers") end ``` While `classic` is gone in Rails...