manageiq icon indicating copy to clipboard operation
manageiq copied to clipboard

Move manageiq and plugins to use zeitwerk autoloader instead of classic

Open jrafanie opened this issue 3 years ago • 2 comments

https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#rails-autoloaders

Rails 7 requires zeitwerk for autoloading code and we have numerous code loading problems that may be resolved by moving our plugins and core code to using zeitwerk. We just have to decide how we can split it up and do it.

https://github.com/ManageIQ/manageiq/issues/zeitwerk

% bin/rails zeitwerk:check

https://github.com/rails/rails/blob/cbfe735c69a37446d0c5a9d448ad6d181abd1736/guides/source/classic_to_zeitwerk_howto.md

jrafanie avatar Jul 15 '22 17:07 jrafanie

Hoping this can kill DescendantLoader. 🙏

Fryguy avatar Jul 19 '22 19:07 Fryguy

I was considering if it would be easier to enable zeitwerk loader in the plugins first... since they might be easier to get in "compliance" and could guide the direction for these big repositories.

jrafanie avatar Jul 19 '22 20:07 jrafanie