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

Do not add lib/generators to Zeitwerk autoloader #192

Merged
merged 1 commit into from
Jan 9, 2021
Merged

Conversation

bensheldon
Copy link
Owner

@bensheldon bensheldon commented Jan 9, 2021

I think (and experimentally believe) that the rails generator command does an implicit lookup and the generator does not have to be explicitly loaded.

Many other gems appear to explicitly ignore lib/generators too: https://github.com/search?l=Ruby&q=Zeitwerk%3A%3ALoader.for_gem+generators&type=Code

Addresses this issue of the Zeitwerk autoloader complaining that it expects lib/generators/good_job/templates to contain a matching class. #160 (comment)

@bensheldon bensheldon changed the title Do not add lib/generators to autoloader Do not add lib/generators to Zeitwerk autoloader Jan 9, 2021
@bensheldon bensheldon merged commit f1fe67f into main Jan 9, 2021
@bensheldon bensheldon deleted the require_install branch January 9, 2021 17:33
@bensheldon bensheldon added the bug Something isn't working label Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant