Open joelzwarrington opened 2 months ago
That example ^ doesn't exactly work though, it works if you're not using Rails, but as soon as you add the gem to Rails it conflicts with the Zeitwerk loader added by the gem:
Zeitwerk::Loader
wants to manage directory /xyz, which is already managed by
Zeitwerk::GemLoader
Hi @joelzwarrington, no particular reason if I remember correctly. I think we can totally move the files to lib
. Would that imply that when we want to override a ViewComponent::Form component locally, the file would need to be in lib
as well, rather than app
? In this case this would be a breaking change.
I'm working on a UI library which will use ViewComponent::Form and Zeitwerk doesn't like the non-standard file structure.
There is an engine which configures autoload paths, but this doesn't work well when used in the context of another gem.
I've setup a 'hack' to auto load the
app
paths:I'm wondering if there's a reason it's setup this way which might not be immediately obvious?