Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add group metadata to EEP48 #9183

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lib/kernel/doc/guides/eep48_chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,20 @@ information to each entry. This EEP documents the following metadata keys:
deprecated with a binary that represents the reason for deprecation and a
recommendation to replace the deprecated code.

- **`group := binary()`** - when present, it allows tooling, such as shell
autocompletion and documentation generators, to list all entries within the
same group together, often using the group name as an indicator. It currently
only applies to doc entries, not for module metadata.

- **`since := binary()`** - a binary representing the version such entry was
added, such as `<<"1.3.0">>` or `<<"20.0">>`.

- **`source_path := binary()`** - the absolute location of the source file for
this module. Applies only to the module metadata.

- **`source_annos := [erl_anno:anno()]`** - a list of source code locations.
You may either store one for each clause or only for the first clause.

- **`source_path := binary()`** - the absolute location of the source file for
this module. Applies only to the module metadata.

Any key may be added to Metadata at any time. Keys that are frequently used by
the community can be standardized in future versions.

Expand Down
3 changes: 3 additions & 0 deletions system/doc/reference_manual/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ There are four reserved metadata keys for `-doc`:
explaining that it is deprecated and what to use instead. The compiler will
automatically insert this key if there is a `-deprecated` attribute marking a
function as deprecated.
- `group => unicode:chardata()` - A group that the function, type or callback belongs to.
It allows tooling, such as shell autocompletion and documentation generators, to list all
entries within the same group together, often using the group name as an indicator.
- `equiv => unicode:chardata() | F/A | F(...)` - Notes that this function is equivalent to
another function in this module. The equivalence can be described using either
`Func/Arity`, `Func(Args)` or a [unicode string](`t:unicode:chardata/0`). For example:
Expand Down
Loading