You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current manner in which any .rb file in ./plugins is simply loaded (and reloaded on subsequent changes) is out of step with other parts of the system which use Zeitwerk. In addition, there's no way to easily add new paths to the Zeitwerk autoloader or to trigger a reload from an arbitrary part of the system (based on watching files in some particular folder).
It seems to me it'd make sense to double-down on Zeitwerk, ensure there's a centralized/configurable ability to set up load paths, and use that in as many places as necessary. This would be a breaking change however as currently files in plugins are entirely arbitrary. You could have foo.rb define class Bar, or not even have a class in it at all. Once Zeitwerk is in place, it would enforce all the usual naming conventions we have elsewhere, in Rails, etc. But I think ultimately that's desirable anyway.
The text was updated successfully, but these errors were encountered:
The current manner in which any
.rb
file in./plugins
is simplyload
ed (and reload
ed on subsequent changes) is out of step with other parts of the system which use Zeitwerk. In addition, there's no way to easily add new paths to the Zeitwerk autoloader or to trigger a reload from an arbitrary part of the system (based on watching files in some particular folder).It seems to me it'd make sense to double-down on Zeitwerk, ensure there's a centralized/configurable ability to set up load paths, and use that in as many places as necessary. This would be a breaking change however as currently files in
plugins
are entirely arbitrary. You could havefoo.rb
defineclass Bar
, or not even have a class in it at all. Once Zeitwerk is in place, it would enforce all the usual naming conventions we have elsewhere, in Rails, etc. But I think ultimately that's desirable anyway.The text was updated successfully, but these errors were encountered: