Skip to content

Replace callback docs copy with a link #1093

@wojtekmach

Description

@wojtekmach

In #641 we made it so that callbacks docs are copied to a function (unless it has @doc false).

There was a similar proposal #815 about copying typespecs which ultimately has not been accepted given the copy can be wrong, if it referred to private types. The same problem exists for copying docs although it's less severe given it's, well, docs.

I'd like to propose to replace docs copy with docs that just give a link to appropriate callback, e.g.: @doc "Implementation for callback c:GenServer.handle_call/3.". One particular advantage of this solution is we can now hover over the link and we'll see the typespec in the popover.

If this is accepted, we should probably make similar change to IEx which I'll be happy to do.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions