salsify / avromatic

Generate Ruby models from Avro schemas
MIT License
89 stars 17 forks source link

Avromatic Support for Zeitwerk #145

Closed jturkel closed 2 years ago

jturkel commented 2 years ago

Avromatic currently doesn't support the zeitwerk classloader when using eager loaded nested modules. Attempts to do so result in an error like this:

Attempted to replace existing Avromatic model Emails::Events::EmailRecipient with new model Emails::Events::EmailRecipient as 'emails.email_recipient'. Perhaps 'Emails::Events::EmailRecipient' needs to be eager loaded via the Avromatic eager_load_models setting?

I'm working on a fix...