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

Zeitwerk defines the constant Generators after the directory #1034

Closed
2 of 6 tasks
vfonic opened this issue Jul 11, 2022 · 1 comment
Closed
2 of 6 tasks

Zeitwerk defines the constant Generators after the directory #1034

vfonic opened this issue Jul 11, 2022 · 1 comment
Labels
Good first issue Good for newcomers hacktoberfest Help wanted We could use some help with this

Comments

@vfonic
Copy link
Contributor

vfonic commented Jul 11, 2022

Describe the bug

WARNING: Zeitwerk defines the constant Generators after the directory

    /Users/viktor/.rvm/gems/ruby-3.1.2/gems/avo-1.25.1/lib/generators

To prevent that, please configure the loader to ignore it:

    loader.ignore("#{__dir__}/generators")

Otherwise, there is a flag to silence this warning:

    Zeitwerk::Loader.for_gem(warn_on_extra_files: false)

Steps to Reproduce

Steps to reproduce the behavior:

  1. Add Avo to your Rails project Gemfile: `gem 'avo', '~> 1.25'
  2. bundle install
  3. bundle exec rails console
  4. See error

Expected behavior

No warnings raised

Actual behavior

Zeitwerk raises an error about Avo generator

System configuration

Avo version: 1.25.1

Rails version: 6.0.5

Ruby version: 3.1.2

License type (Community or Pro): Community

Additional context

Impact

  • High impact
  • Medium impact
  • Low impact

Urgency

  • High urgency
  • Medium urgency
  • low urgency
@adrianthedev adrianthedev added Help wanted We could use some help with this Good first issue Good for newcomers V1.0 labels Jul 11, 2022
@adrianthedev
Copy link
Collaborator

Hey @vfonic. Thanks for writing. That's fixed on V2, which is the main development branch.
PRs are welcome on 1.x branch though. I can cut a release after a PR has been merged.

Related PR on main branch: https://github.com/avo-hq/avo/pull/963/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Good for newcomers hacktoberfest Help wanted We could use some help with this
Projects
None yet
Development

No branches or pull requests

2 participants