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

Fix Zeitwerk compatibility #2013

Merged
merged 3 commits into from
Oct 2, 2023
Merged

Fix Zeitwerk compatibility #2013

merged 3 commits into from
Oct 2, 2023

Conversation

tf
Copy link
Member

@tf tf commented Oct 2, 2023

REDMINE-19438

@tf tf added this to the v16.1.0 milestone Oct 2, 2023
tf added 3 commits October 2, 2023 07:20
Add paths to both `autoload_paths` and
`eager_load_paths`. `eager_load_paths` is required to have paths
covered by `zeitwerk:check`.

Ignore and require Paperclip processors, which are cached during
initialization and, thus, cannot be reloaded.

For Rails < 6, we cannot add `lib` to the `eager_load_paths` since
Resque eager loads [1], which then evaluates the engine class a second
time. This time `autoload_paths` is already frozen, resulting in an
error.

Do not invoke `configure!` in `finalize!` to prevent triggering auto
loading during initialization. Instead rely on `to_prepare` in
Pageflow engine to call `configure!`.

REDMINE-19438

[1] https://github.com/resque/resque/blob/v1.27.4/lib/resque/tasks.rb#L45

REDMINE-19439
Required for plugin test suites.

REDMINE-19438
@tf tf merged commit 383a7d3 into codevise:master Oct 2, 2023
@tf tf deleted the zeitwerk branch October 2, 2023 05:34
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.

1 participant