-
Notifications
You must be signed in to change notification settings - Fork 8
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
AlecK/APPEALS-44509 - (6.1 Base) #1671
base: AlecK/APPEALS-46558
Are you sure you want to change the base?
Conversation
# frozen_string_literal: true | ||
require "rails_helper" | ||
|
||
# See config/initializers/zeitwerk.rb if this fails | ||
RSpec.describe "Zeitwerk Compliance Check" do | ||
it "Eager loads all files without errors" do | ||
expect { Rails.application.eager_load! }.not_to raise_error | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For conformity w/ Caseflow, let's move this file to spec/config/zeitwerk_spec.rb
.
config.autoload_paths += Dir[Rails.root + 'app/jobs'] | ||
config.autoload_paths << Rails.root.join('lib') | ||
config.autoload_paths << Rails.root.join('lib/scripts') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move the Zeitwerk inflector settings here (before config.autoload_paths
) and delete the initializer, as was done for Caseflow in this commit.
This is a precautionary move, to circumvent potential sequencing issues when autoloading inflected constants in the autoload_once_paths
(via the once
autoloader).
We are not currently autloading anything with the once
autoloader, but if down the road we need to, this will be one less gotcha we'll have to deal with.
For more details on this issue, see rails/rails#45568
Resolves AlecK/APPEALS-44509
Description
These are the changes necessary for eFolder to become Zeitwerk compliant.
Acceptance Criteria
bin/rails zeitwerk:check