Hi all, are there any popular conventions around writing package extensions in Elixir projects and where to put them? Example extensions that come to mind are: custom Ecto.Query macros and Ecto.Type/Phoenix.HTML.Safe implementations for project-specific or 3rd-party data types.
Perhaps something like this would make sense?
lib/my_app/
lib/my_app/my_module/ecto.ex # or putting Ecto-specific code at the end of lib/my_app/my_module.ex
lib/my_app/my_module/phoenix.ex
...
lib/ecto/custom_query_macros.ex # Ecto.CustomQueryMacros
lib/third_party_package/ecto.ex
lib/third_party_package/phoenix.ex
...
lib/mix/tasks/
Btw, this topic reminds me a little bit of an old DockYard blog post by @bcardarella Love your lib directory for organizing lib in Rails apps.
Really courious how other people are structuring extensions in their own projects.