I personally really appreciate the documentation feature built into Elixir and like having it accessible from the REPL. But I've noticed advanced projects like Ecto and Phoenix tend to generate a lot of code for users, and the documentation for those generated modules are missing (to the user) or more accurately they reside in a different spot from where they are intended to be called from.
As an example, take Ecto's Repo module.
All these functions get exposed to a user's Repo module (plus a few more above). However, in the REPL, doing `h MyApp.Repo.all/2` returns blank documentation. Tab completion works for users trying to feel their way around the module, but its confusing to new users (and advanced) where to find the proper documentation when these things fail to do what the user expected.
I'd like to contribute if possible. Would the Elixir community be open to a PR allowing something like these changes to the Repo.all for example:
docdelegate Ecto.Repo.Queryable.all/4
def all(queryable, opts \\ []) do
Ecto.Repo.Queryable.all(__MODULE__, @adapter, queryable, opts)
end
Then documentation stored at `Ecto.Repo.Queryable.all/4` would be accessible from doing `h MyApp.Repo.all/2` in IEx.
Any ideas that could better this? I hope this isn't something that will be just glossed over as "thats just how it is" and left alone.