Skip to content

Extracting EEP 059 doc attributes for private functions #9022

Open
@robertoaloi

Description

@robertoaloi

In EEP 059 we state that:

The -doc attribute can be used for private function as well, so that tools and IDEs can provide docs if the user wants them to.

But, from what I can tell, the current mechanism to extract -doc attributes is currently located in the private (as in -moduledoc false) beam_doc module, which only extracts them for exported functions.

Language servers often work with the source code directly (except for OTP libraries or dependencies), so having a defined API to extract doc attributes would be useful.

  • What's the recommended API for language servers to extract doc attributes, since beam_doc is undocumented and could change at any time?
  • Maybe we could make beam_doc accept an option to regulate this behaviour? (Right now it would be possible to add an export_all attribute to the AST, but it feels like a hack).

Metadata

Metadata

Assignees

Labels

help wantedIssue not worked on by OTP; help wanted from the communityteam:VMAssigned to OTP team VM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions