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

Mark deprecated entities in Doxygen and in the codebase #249

Closed
wants to merge 3 commits into from

Conversation

pniedzielski
Copy link
Collaborator

This PR continues the work started with #242, converting our existing BDE-style documentation to a format that Doxygen understands. The changes here are independent of those in #242, though, so we contribute them as a separate PR. Please see individual commit messages for more detailed information.

Three changes are included:

  1. Fix some BDE-style comments that were not automatically converted.
  2. Use Doxygen's @deprecated paragraphs where possible.
  3. Use BDE's BSLA_DEPRECATED annotations where possible.

The patches break these changes up somewhat differently so each commit builds without introducing new warnings at each stage.

During the process of open-sourcing BlazingMQ, we converted our public SDK
documentation from the BDE style (which our broker implementation still uses)
to the more common and standard Doxygen style.  However, we seem to have missed
a few documentation comments along the way.  This patch converts two such
comments, moving them above the function to which they apply and converting BDE
markup to the Doxygen-supported Markdown markup.

Signed-off-by: Patrick M. Niedzielski <[email protected]>
This patch converts the unstructured, artisanal API deprecation warnings
in the documentation for MWC and for our public SDK (`bmqa`, `bmqt`)
into Doxygen `@deprecated` tags, and also adds corresponding
`BSLA_DEPRECATED` attributes to the affected entities.

First, by converting deprecation warnings into tags that Doxygen knows
about, Doxygen is able to construct a list of deprecated entities in the
library, as well as gray them out in generated documentation for the
classes or components they appear in.  The changes here consist of
converting handwritten `DEPRECATED:` sections into `@deprecated`
paragraphs, and correcting minor grammatical errors in those paragraphs.

Second, introducing `@deprecated` tags into the Doxygen documentation
comments causes clang to issue warnings that there is no corresponding
`[[deprecated]]` annotation on the entity that the documentation comment
applies to.  Thus, for each modified Doxygen documentation comment, we
also add the `BSLA_DEPRECATED` annotation, which expands to
`[[deprecated]]` when compiled with an implementation that supports this
attribute.

Signed-off-by: Patrick M. Niedzielski <[email protected]>
The `bsls_annotation` component, which provides macros like
`BSLS_ANNOTATION_DEPRECATED` which wrap standard C++ attributes for use
with earlier compilers, has been deprecated in favor of the `bsla`
package.  In particular, the `bsla_annotations` component exports macros
like `BSLA_DEPRECATED`, which supersede `BSLS_ANNOTATION_DEPRECATED`.

This patch converts uses of `BSLS_ANNOTATION_DEPRECATED` to
`BSLA_DEPRECATED`, including in cases where the annotation is marked in
comments rather than code.  We also take this opportunity to convert
notices in the documentation to Doxygen style, bringing them into line
with other locations in the codebase.

Signed-off-by: Patrick M. Niedzielski <[email protected]>
@pniedzielski pniedzielski added documentation Improvements or additions to documentation A-Client Area: C++ SDK A-Docs Area: Documentation labels Apr 15, 2024
@pniedzielski pniedzielski requested a review from a team as a code owner April 15, 2024 22:26
@pniedzielski pniedzielski deleted the deprecation branch May 1, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client Area: C++ SDK A-Docs Area: Documentation documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants