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

Update various documentation comments #4185

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Update various documentation comments #4185

merged 1 commit into from
Jul 19, 2024

Conversation

randombit
Copy link
Owner

@reneme This is a merge of (as best I could handle after the various merge conflicts) the doc updates you made for Breathe. I'm pretty unconvinced of Breathe still (and especially since it seems to have been abandoned by the upstream dev now...) but the doc comments obviously have a lot of value no matter what. In retrospect I wish we had merged the doc comment updates immediately at the time, and deferred just the Breathe integration part, but so it goes.

@randombit randombit requested a review from reneme July 7, 2024 17:46
@randombit
Copy link
Owner Author

Feel free to take over this PR/open a new one with this as the base/force push/whatever

@reneme
Copy link
Collaborator

reneme commented Jul 7, 2024

Oh wow! Thanks for taking that apart. I'll check it out soon. Agreed though, if breathe is abandoned by now, that's no good. 😔

src/lib/modes/cipher_mode.h Outdated Show resolved Hide resolved
Comment on lines 99 to 101
* @deprecated This virtual function is deprecated, and will be removed in
* a future release. Use (and override) find_cert_chain()
* instead.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Clang warns that the docstring claims a deprecation but there's no [[deprecated]] attribute in the function's declaration.
This would be fixable by adding BOTAN_DEPRECATED(). However, when we build with the deprecation annotations being disabled (e.g. amalgamation builds), this clang warning might still show up and break things (due to -Werror).

I think we should either disable this clang warning (-Wdocumentation-deprecated-sync), or not use @deprecated in the Doxygen comments. This seems to be the only/first location where we use it anyway.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That said: clang has a point. We should actually mark this as deprecated in favor of find_cert_chain(). When invoked in a client-auth context, find_cert_chain() conveniently delivers information about the advertised acceptable CAs of the server.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I removed the @deprecated comment but also did introduce a BOTAN_DEPRECATED annotation here.

src/lib/tls/credentials_manager.h Outdated Show resolved Hide resolved
src/lib/tls/tls_callbacks.h Outdated Show resolved Hide resolved
@reneme
Copy link
Collaborator

reneme commented Jul 18, 2024

Once this is merged, I'll close the various breathe PRs to reduce clutter. I agree that breathe doesn't seem to deliver on what we need. Nevertheless, it would be great to somehow interface between the sphinx and doxygen documentation to avoid duplicating too much content.

@randombit
Copy link
Owner Author

Nevertheless, it would be great to somehow interface between the sphinx and doxygen documentation to avoid duplicating too much content.

I do agree, there is a real need for something that is basically Doxygen+Sphinx combined (but ideally also faster than either...)

@coveralls
Copy link

coveralls commented Jul 19, 2024

Coverage Status

coverage: 91.736% (+0.008%) from 91.728%
when pulling 2b46eab on jack/breathe-docs
into 7c07dbd on master.

This was originally done by René in a series of doc updates related to
using Breathe for our API reference. I (Jack) am still unconvinced of
adopting this for various reasons (build times, limited distro
support, apparently abandoned upstream, etc) but the documentation
comments themselves are certainly an improvement.
@randombit randombit merged commit a46783c into master Jul 19, 2024
39 checks passed
@randombit randombit deleted the jack/breathe-docs branch July 19, 2024 20:51
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.

None yet

3 participants