Skip to content

Commit

Permalink
Merge pull request #9183 from josevalim/patch-35
Browse files Browse the repository at this point in the history
Add group metadata to EEP48
  • Loading branch information
garazdawi authored Dec 16, 2024
2 parents 6b716e8 + d3b8b15 commit 0fe99d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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

0 comments on commit 0fe99d9

Please sign in to comment.