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

Fix broken doc signatures and links #9018

Open
wants to merge 17 commits into
base: maint
Choose a base branch
from

Conversation

garazdawi
Copy link
Contributor

This PR removes broken doc signatures that were generated as part of the erl_docgen to ex_doc migration.

It also removes all anchors at the end of a documentation attribute as those links to those anchors almost always pointed to an incorrect place in the docs.

These anchors were used a long time ago to point to the
function after the current function, but their use have
become obsolete with the usage of ex_doc.
These anchors were used a long time ago to point to the
function after the current function, but their use have
become obsolete with the usage of ex_doc.
These anchors were used a long time ago to point to the
function after the current function, but their use have
become obsolete with the usage of ex_doc.
These anchors were used a long time ago to point to the
function after the current function, but their use have
become obsolete with the usage of ex_doc.
These anchors were used a long time ago to point to the
function after the current function, but their use have
become obsolete with the usage of ex_doc.
@garazdawi garazdawi added team:VM Assigned to OTP team VM team:PS Assigned to OTP team PS documentation labels Nov 5, 2024
@garazdawi garazdawi added this to the OTP-27.2 milestone Nov 5, 2024
@garazdawi garazdawi self-assigned this Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

CT Test Results

   14 files    245 suites   3h 18m 0s ⏱️
4 360 tests 4 082 ✅ 278 💤 0 ❌
6 806 runs  6 257 ✅ 549 💤 0 ❌

Results for commit 031eb6f.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

Copy link
Contributor

@dgud dgud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why you have kept some function call examples

@@ -1986,7 +1980,7 @@ paged_result_control(PageSize, Cookie) when is_integer(PageSize) ->
%%% --------------------------------------------------------------------

-doc """
paged_result_cookie(SearchResult) -> binary()
paged_result_cookie(SearchResult)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

@@ -52,7 +52,7 @@
%% integer() - explicit detail level of tracing
%%----------------------------------------------------------------------
-doc """
make_pattern(RawPattern) -> TracePattern
make_pattern(RawPattern)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@@ -115,7 +115,7 @@ make_pattern({Mod, Pattern}) when is_atom(Mod) ->
%% accordingly with erlang:trace_pattern/2.
%%----------------------------------------------------------------------
-doc """
change_pattern(Pattern) -> ok
change_pattern(Pattern)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

-spec tracer() -> {ok, [node()]} | {error, term()}.
tracer() -> tracer(node()).
-doc """
tracer(Nodes) -> Result
tracer(Nodes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@@ -820,7 +794,7 @@ tpl(A,B,C) ->
dbg:tpl(A,B,ms(C)).

-doc """
tpl(Module [, Function [, Arity]], MatchSpec)
tpl(Module, Function, Arity, MatchSpec)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

@garazdawi
Copy link
Contributor Author

@dgud I kept them because otherwise the signature will be incorrect.

@@ -248,8 +244,6 @@ call(ChannelPid, Msg, TimeOute) ->
end.

-doc """
cast(ChannelRef, Msg) -> ok
Sends an asynchronous message to the channel process and returns ok immediately,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls explain. is leaving paragraph containing more than 1 sentence as a signature also fine? In other places I thought single sentence is preferred ...

@@ -216,8 +214,6 @@ call(ChannelPid, Msg) ->
call(ChannelPid, Msg, infinity).

-doc """
call(ChannelRef, Msg, Timeout) -> Reply | {error, Reason}
Copy link
Contributor

@u3s u3s Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while at it. reply/2 and enter_loop/1 docs look strange in similar aspect. can you adjust them as well?

image

below funny italic also is rendered as we have text between _ characters.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation team:PS Assigned to OTP team PS team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants