Project

General

Profile

Actions

Feature #32938

closed

Rails 6: Zeitwerk support

Added by Pavel Rosický about 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Rails support
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

https://github.com/fxn/zeitwerk

DEPRECATION WARNING: Initialization autoloaded the constants ActiveRecord::Acts,
 ActiveRecord::Acts::Tree, Redmine::I18n, Redmine::Helpers, Redmine::Helpers::URL
, Redmine::SafeAttributes, Redmine::SubclassFactory, CustomField, Redmine::Utils,
 Redmine::Configuration, Redmine::Scm::Adapters::CommandFailed, IssueRelation,
 Redmine::WikiFormatting::Macros, Redmine::Pagination, Redmine::SudoMode, ApplicationHelper
, Redmine::WikiFormatting::Textile, Redmine::WikiFormatting::Textile::Formatter,
 Redmine::WikiFormatting::Textile::Helper, Redmine::WikiFormatting::HtmlParser
, Redmine::WikiFormatting::Textile::HtmlParser, Redmine::WikiFormatting::Markdown,
 Redmine::WikiFormatting::Markdown::Formatter, Redmine::WikiFormatting::Markdown::HTML,
 Redmine::WikiFormatting::Markdown::Helper, Redmine::WikiFormatting::Markdown::HtmlParser,
 Redmine::Views::ApiTemplateHandler, and Setting.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload ActiveRecord::Acts, for example,
the expected changes won't be reflected in that stale Module object.

`config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.

Please, check the "Autoloading and Reloading Constants" guide for solutions.

Files

0001-Explicitly-require-a-class-called-in-initializers-th.patch (4.01 KB) 0001-Explicitly-require-a-class-called-in-initializers-th.patch Mizuki ISHIKAWA, 2021-10-19 08:50
0002-Split-multiple-classes-and-modules-that-existed-in-t.patch (18.7 KB) 0002-Split-multiple-classes-and-modules-that-existed-in-t.patch Mizuki ISHIKAWA, 2021-10-19 08:50
0003-Move-lib-redmine-core_ext-to-lib-core_ext.patch (2.29 KB) 0003-Move-lib-redmine-core_ext-to-lib-core_ext.patch Mizuki ISHIKAWA, 2021-10-19 08:50
0004-Remove-require_dependency.patch (2.06 KB) 0004-Remove-require_dependency.patch Mizuki ISHIKAWA, 2021-10-19 08:50
0006-Change-camelcase-rules-to-keep-special-module-or-cla.patch (1.14 KB) 0006-Change-camelcase-rules-to-keep-special-module-or-cla.patch Mizuki ISHIKAWA, 2021-10-19 08:50
0005-Fix-modules-where-folder-structure-does-not-meet-Zei.patch (82.8 KB) 0005-Fix-modules-where-folder-structure-does-not-meet-Zei.patch Mizuki ISHIKAWA, 2021-10-19 08:50
0008-Change-autoload-mode-from-classic-to-zeitwerk.patch (1.01 KB) 0008-Change-autoload-mode-from-classic-to-zeitwerk.patch Mizuki ISHIKAWA, 2021-10-19 08:50
0007-Move-only-modules-and-classes-that-match-Zeitwerk-ru.patch (109 KB) 0007-Move-only-modules-and-classes-that-match-Zeitwerk-ru.patch Mizuki ISHIKAWA, 2021-10-19 08:50
0001-Move-DateValidator-to-app-validators.patch (1.14 KB) 0001-Move-DateValidator-to-app-validators.patch Marius BĂLTEANU, 2021-10-23 00:50
split-lib-diff.patch (11.6 KB) split-lib-diff.patch Mizuki ISHIKAWA, 2021-10-25 09:44
0001-Refactor-lib-diff.rb.patch (19 KB) 0001-Refactor-lib-diff.rb.patch Marius BĂLTEANU, 2021-10-26 09:32
alt-0001-Extract-Redmine-PluginLoader-from-Redmine-Plugin.patch (11 KB) alt-0001-Extract-Redmine-PluginLoader-from-Redmine-Plugin.patch Takashi Kato, 2021-10-27 11:57
alt-0002-Move-preparation-code-to-redmine-preparation.rb.patch (46.4 KB) alt-0002-Move-preparation-code-to-redmine-preparation.rb.patch Takashi Kato, 2021-10-27 11:57
alt-0003-Add-core-extensions-in-prepare-method.patch (2.4 KB) alt-0003-Add-core-extensions-in-prepare-method.patch Takashi Kato, 2021-10-27 11:57
alt-0004-Load-core-plugins-with-require.patch (2.67 KB) alt-0004-Load-core-plugins-with-require.patch Takashi Kato, 2021-10-27 11:57
alt-0005-Use-zeitwerk.patch (5.21 KB) alt-0005-Use-zeitwerk.patch Takashi Kato, 2021-10-27 11:58

Related issues

Related to Redmine - Feature #29914: Migrate to Rails 6.1 with Zeitwerk autoloadingClosedGo MAEDA

Actions
Related to Redmine - Defect #36218: Plugin assets are not copied correctly in trunk r21289ClosedMarius BĂLTEANU

Actions
Related to Redmine - Defect #36245: ActiveSupport::Reloader.to_prepare not working in trunk 21287Resolved

Actions
Related to Redmine - Defect #36287: rake redmine:plugins:assets failsClosedGo MAEDA

Actions
Related to Redmine - Defect #15958: AnonymousUser class not found by pluginClosed

Actions
Related to Redmine - Defect #36835: Redmine::Plugin.assets_directory is not working after r21283ClosedMarius BĂLTEANU

Actions
Has duplicate Redmine - Defect #35004: DEPRECATION WARNING during startupClosed

Actions
Actions

Also available in: Atom PDF