ash-project / igniter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`ash.gen.domain` Igniter task does not respect config `module_location: :inside_matching_folder`

sevenseacat opened this issue · comments

Describe the bug

With an Igniter setup file specifying:

[
  module_location: :inside_matching_folder
]

I thought that generating a domain with the following command:

mix ash.gen.domain Cat.Music

Would place the generated file in lib/cat/music/music.ex.

It seems like the config is ignored - it still wants to place the module in lib/cat/music.ex.

Do domains have to be treated specially somehow? Igniter doesn't seem to want to move them into the named folder with igniter.move_files, either.

Runtime

  • Elixir version 1.17.0-otp-27
  • Erlang version 27.0
  • OS macOS Sonoma
  • Ash version main @ d04e846f2cb00ca514e43b04c41c87ad9fb92b86
  • Igniter version main @ 27b6808

This is by design. A module will only be created inside a folder matching its name if that file exists. If the folder is ever created (by an igniter) then the module will be moved into that folder.