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

Avoid require_dependency if Zeitwerk is enabled #98

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

casperisfine
Copy link

Ref: rails/rails#37599

That require_dependency is here to workaround a limitation in Rails's Classic autoloader (as explained here).

Since Rails 6, there's a new autoloader available, which doesn't have this limitation, as well as an option to not add autoloaded paths to the global $LOAD_PATH.

That later option breaks latter_opener_web.

@pseudomuto @rafaelfranca @Edouard-chin @etiennebarrie

Copy link
Contributor

@pseudomuto pseudomuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, just to clarify: if Zeitwerk is enabled, we don't need to require dep because it'll deterministically find the correct ApplicationController?

@casperisfine
Copy link
Author

if Zeitwerk is enabled, we don't need to require dep because it'll deterministically find the correct ApplicationController?

Yep!

@pseudomuto pseudomuto merged commit e228d59 into fgrehm:master Oct 30, 2019
@pseudomuto pseudomuto deleted the zeitwerk branch October 30, 2019 18:04
@casperisfine
Copy link
Author

👋 could we get a new release ?

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

Successfully merging this pull request may close these issues.

3 participants