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

Eager loading problem in version 2.1.5 (also in classic autoloader) #43

Closed
brian-kephart opened this issue Apr 25, 2019 · 2 comments
Closed

Comments

@brian-kephart
Copy link

I have a few apps using Camaleon CMS, which is a Rails engine. When I tried to upgrade from Rails 5.2.3 to 6.0.0rc1, eager loading broke and the app won't boot with it turned on.

I realize this could be seen as an issue with Camaleon, but there appears to be a regression from 2.1.4 to 2.1.5.

I also was under the impression that setting the autoloader to :classic should preserve pre-6.0 behavior, but that is not the case as things that load fine in 5.2 do not load correctly in classic mode.

Symptoms:

  • not working with Zeitwerk 2.1.5
  • not working with config.autoloader = :classic
  • working with Zeitwerk 2.1.4 (non-classic mode only)

Repro here: https://github.com/brian-kephart/zeitwerk_issue. Steps:

  • git clone https://github.com/brian-kephart/zeitwerk_issue.git
  • bundle
  • rails s (app should boot)
  • comment out the zeitwerk entry in the Gemfile and bundle update zeitwerk, or uncomment config.autoloader = :classic in application.rb, and the app will no longer boot.
@fxn
Copy link
Owner

fxn commented Apr 25, 2019

The engine does not comply with the requirements of :zeitwerk mode. As it is, you have to run your application in :classic mode. Have explained it in this issue.

Regarding :classic mode, the error you get is not related to autoloading, I have explained it in this other issue.

@fxn fxn closed this as completed Apr 25, 2019
@brian-kephart
Copy link
Author

Thanks for the response, and for filing the issue. The multiple problems made things confusing, so thanks for clearing it up.

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

2 participants