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 #22488

Merged
merged 6 commits into from
Aug 23, 2023
Merged

Zeitwerk #22488

merged 6 commits into from
Aug 23, 2023

Commits on Aug 21, 2023

  1. Configuration menu
    Copy the full SHA
    17a20e8 View commit details
    Browse the repository at this point in the history
  2. Workaround dev issue with nuage needing qpid_proton

    Nuage depends on qpid_proton which we can't require on mac
    
    In dev, if we eager load the application, such as with `rake zeitwerk:check`, this file blows up
    on mac because qpid_proton is an optional dependency but actively referenced in messaging_handler.rb.
    
    Only ignore loading qpid_proton here on mac.
    jrafanie committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    f0f7bfb View commit details
    Browse the repository at this point in the history
  3. Switch autoloader to zeitwerk

    Add note about rails 6.1 defaults for when we start work on rails 7:
    Disable defaults as ActiveRecord::Base.belongs_to_required_by_default = true
    causes MiqRegion.seed to fail validation on belongs_to :maintenacne zone.
    jrafanie committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    a8cdc21 View commit details
    Browse the repository at this point in the history
  4. pdf_generator directory is for code organization only, not namespacing

    Fixes the following with zeitwerk when running the spec/lib/pdf_generator_spec.rb test:
    
    expected file /Users/joerafaniello/Code/manageiq/lib/pdf_generator/null_pdf_generator.rb to define constant PdfGenerator::NullPdfGenerator, but didn't
    jrafanie committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    85a2eb1 View commit details
    Browse the repository at this point in the history
  5. Disable yaml autoloader spec for zeitwerk as we can't test it this way

    We can't modify the frozen autoload paths with zeitwerk.
    
    For now, just disable this test with zeitwerk loader.
    jrafanie committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    5dfd15e View commit details
    Browse the repository at this point in the history
  6. Add ENV variable to debug zeitwerk with logging and eager loading

    It's far easier to debug in dev/test/containers using an ENV variable
    so we'll make it so zeitwerk stdout logging and eager loading of all engines
    is only done with this flag enabled.
    jrafanie committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    738b833 View commit details
    Browse the repository at this point in the history