Skip to content
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

Rails integration eagerly loads ActionController::Base #69

Open
sfnelson opened this issue Nov 14, 2019 · 0 comments
Open

Rails integration eagerly loads ActionController::Base #69

sfnelson opened this issue Nov 14, 2019 · 0 comments

Comments

@sfnelson
Copy link

sfnelson commented Nov 14, 2019

Rails integration refers to ActionController::Base directly. This breaks lazy loading for all controllers and causes Rails 6 to want about eagerly loaded Constants, e.g.

DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload ActionText::ContentHelper, for example,
the expected changes won't be reflected in that stale Module object.

These autoloaded constants have been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.

This also causes occasional errors in development when constants should change but do not due to improper load order.

sfnelson added a commit to katalyst/princely that referenced this issue Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant