Skip to content

Remove redundant text in @deprecated messages - #6876

Merged
rhcarvalho merged 1 commit into
phoenixframework:mainfrom
praialabs:deprecation-msgs
Oct 13, 2026
Merged

rhcarvalho merged 1 commit into
phoenixframework:mainfrom
praialabs:deprecation-msgs

Conversation

@rhcarvalho

Copy link
Copy Markdown
Collaborator

While reviewing what's coming new in Elixir v1.21 and eventually proposing elixir-lang/ex_doc#2274, I noticed a few of the @deprecated messages produced suboptimal documentation in HexDocs and compiler warnings.

ExDoc renders "This function is deprecated. {...}.", so messages should not repeat "deprecated" nor end in punctuation.

Using MFA instead of function call syntax to refer to an alternative function, e.g. get_flash/2, is idiomatic and consistent.

I did not touch messages in @moduledoc false modules or @doc false functions, as they are not visible in HexDocs anyway, thus avoiding unnecessary churn.

Live docs:

ExDoc renders "This function is deprecated. {...}.", so messages should
not repeat "deprecated" nor end in punctuation.

Using MFA instead of function call syntax to refer to an alternative
function, e.g. `get_flash/2`, is idiomatic and consistent.

Do not touch messages in `@moduledoc false` modules or `@doc false`
functions, as they are not visible in HexDocs anyway, thus avoiding
unnecessary churn.
@rhcarvalho
rhcarvalho merged commit 1bae3a6 into phoenixframework:main Oct 13, 2026
16 checks passed
@rhcarvalho
rhcarvalho deleted the deprecation-msgs branch October 13, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants