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

improve docs of generated library #899

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robamu
Copy link
Contributor

@robamu robamu commented Jan 15, 2025

This adds feature gate displays, for example like the ones in the syn docs.
The generated library only has a few of those, but I find them to be very useful. Fixes #855

@robamu robamu requested a review from a team as a code owner January 15, 2025 16:54
@robamu robamu force-pushed the improve-docs-of-generated-lib branch from b9e67af to 0ccd6f9 Compare January 15, 2025 16:57
@burrbull
Copy link
Member

It is nightly feature, is not it?

@robamu
Copy link
Contributor Author

robamu commented Jan 31, 2025

The additional feature gate displays require building docs with nightly, but it is still possible to generate docs using stable without issues. docs.rs always builds the documentation with nightly.

@burrbull
Copy link
Member

We possibly need a "doc workflow" (on stable & nightly). It can be independent job or added to one of existent. Could you work on this?

@robamu
Copy link
Contributor Author

robamu commented Jan 31, 2025

You mean building the docs for the PACs generated as part of the CI? I could look into this.. I would probably have to adapt the ci/script.sh for this? Maybe it would be a good idea to move the CI from the shell script to the regress tool as a pre-requisite?

@burrbull
Copy link
Member

Maybe it would be a good idea to move the CI from the shell script to the regress tool as a pre-requisite?

Sure. #689
But better in separate PR.

@robamu
Copy link
Contributor Author

robamu commented Feb 4, 2025

#905 is WIP and I already was thinking of how to best add this workflow. I saw that the bash script is used for the clippy check as well. If this is done by the regress tool, I am wondering what the best way would be to do the CI. The regress tool already takes care of creating new projects for each chip. One way would be to also run clippy and doc for each job directly after the check. The alternative would be to run clippy and docs only for a small selection of chips in s separate job.. what would be the better/preferred way here? @burrbull @Emilgardis

@Emilgardis
Copy link
Member

For checking if generated doc comments is correct it'd be enough to just run it with the regular per-target tests imo.

@burrbull
Copy link
Member

burrbull commented Feb 4, 2025

run clippy and docs only for a small selection of chips in s separate job

This is enough

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.

Add (optional) doc_auto_cfg attribute to generated library
3 participants