• X
    restores the ability to manually eager load applications · c0d91a4f
    Xavier Noria 提交于
    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.
    c0d91a4f
zeitwerk_integration_test.rb 11.5 KB