Task aliases in `mix.ex` of dependencies ignored?

Hi all,
So i have a Mix project called table_stage which provides 2 pairs of tasks:

  • table_stage.(migrate|rollback)_repos
  • table_stage.un/instrument

table_stage itself is a mix dependency in a mix project companies

in the mix.pm file of table_stage i have an aliases definition:

defmodule TableStage.Mixfile do
  use Mix.Project
  def project do
    [app: :table_stage,
     aliases: 
      [ "table_stage.migrate": ["table_stage.migrate_repos", "table_stage.instrument"],
        "table_stage.rollback": ["table_stage.uninstrument", "table_stage.rollback_repos"]
      ]
  end
end

When issuing the shell cmd mix table_stage.migrate in the companies project which has table_stage as a dependency I get

paul$ mix table_stage.migrate
** (Mix) The task "table_stage.migrate" could not be found. Did you mean "table_stage.migrate_repos"?

Note that i also tried to define aliases without the table_stage prefix, and those are still not found.

Are aliases in project not supposed to be merged [EDIT: with the aliases defined in dependencies]? The doc says nothing about the topic. The unaliased tasks from table_stage are available in companies though.

Aliases are per project. :slight_smile:

Aliases are shortcuts or tasks specific to the current project.

http://elixir-lang.org/docs/master/mix/Mix.html#module-aliases

Sorry then, i took that current project definitions also include their dependencies’ definitions. Wouldn’t it be desirable though, for visibility consistency with the visibility of Mix.Task.MyTask from a dependency?

In the end it’s just coding an alias as Mix.Task.Alias :slight_smile: Would you consider a doc pull request for clarification? For an alias merge pull request i don’t feel i have enough mix knowledge/focus right now.

Improvements to the documentation are always welcome! So yes, we would love a pull request with further clarification!

Here you go :