docgen/website: show deprecated function warnings on docs website
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:
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.
Thanks for the review :stars: I'll iterate this weekend.
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:
@djc I think this is hopefully ready for one final review. Sorry it's been a slog.