Cannot use function in custom mix task defined in same app

I would guess the MyApp in the error above is referring to the module Mix.Tasks.MyApp, you need to define that first. Elixir would print out the full module path, so this is wrong.

To also prevent confusion, I would recommend doing an abbreviation of some sort–this also adds the convenience of making it easier to type in the terminal, e.g. mix phx.gen.new vs mix phoenix.generate.new

edit: I tested this locally and it seems to work fine, so the above seems to be wrong. I just suspected some sort of module shadowing was taking place