rustls-ffi icon indicating copy to clipboard operation
rustls-ffi copied to clipboard

docgen/website: show deprecated function warnings on docs website

Open cpu opened this issue 7 months ago • 3 comments

Updates the docgen tool from the tools crate to parse the DEPRECATED_FUNC macro invocations ahead of function declarations. Once parsed we can pull out the argument message and include that in the JSON data generated by the tool.

With the deprecated messages the website Zola templates can reference them to add a note of the deprecation in the TOC and to add a warning banner to the item's docs rendering.

Resolves https://github.com/rustls/rustls-ffi/issues/582

Examples:

toc deprecated banner

cpu avatar Jul 10 '25 20:07 cpu

While tidying things up I checked the diff of the generated JSON against the tip-of-main to make sure I didn't break anything that previously worked.

Maybe we should start checking in the data JSON and set up CI to verify that a fresh docgen tool run doesn't produce any diff with the branch content.

That way we could review the JSON diffs alongside code updates (both to the tool & the lib) to see if we accidentally lose items/comments/etc.

cpu avatar Jul 10 '25 20:07 cpu

Thanks for the review :stars: I'll iterate this weekend.

cpu avatar Jul 11 '25 12:07 cpu

cpu marked this pull request as draft

Will try to return to this soon. The weather has been too nice to spend weekends indoors :laughing:

cpu avatar Jul 28 '25 14:07 cpu

@djc I think this is hopefully ready for one final review. Sorry it's been a slog.

cpu avatar Feb 22 '26 20:02 cpu