restores the ability to manually eager load applications
The main interface to eager loading is config.eager_load. The logic that implies happens during the boot process. With the introduction of Zeitwerk, application code is loaded in the finisher as everything else, but in previous versions of Rails users could eager load the application code regardless of config.eager_load. Use cases: * Some gems like indexers need to have everything in memory and would be a bad user experience to ask users to conditionally set the eager load flag. * Some tests may need to have everything in memory and would be a bad experience to have the flag enabled globally in the test environment. I personally feel that the contract between this method and the entire eager loading process is ill-defined. I believe this method is essentially internal. The purpose of this patch is simply to restore this functionality emulating what it did before because rethinking the design of this interface may need time.
Showing
想要评论请 注册 或 登录