DEV: Use internal __autoloads for zeitwork reload check (#20260)
Since ad6c028484
in the zeitwork repo which was introduced to discourse/discourse in PR #20253,
the `autoloads` attribute on the loader has been marked `internal`, which means
that it errors if we try to access it directly.
Instead we should access it via the "mangled" version so it is clear
we're accessing an internal property, which is `__autoloads`.
Without this, any time a ruby file is saved the
000-development_reload_warnings.rb initializer will error.
This commit is contained in:
parent
25a226279a
commit
7a593e2fb5
|
@ -20,7 +20,7 @@ if Rails.env.development? && !Rails.configuration.cache_classes && Discourse.run
|
|||
|
||||
not_autoloaded =
|
||||
files.filter_map do |file|
|
||||
autoloaded = Rails.autoloaders.main.autoloads.key? file
|
||||
autoloaded = Rails.autoloaders.main.__autoloads.key? file
|
||||
Pathname.new(file).relative_path_from(Rails.root) if !autoloaded
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue