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

Generated documentation should include feature-gated APIs #992

Closed
Tracked by #1221
bugadani opened this issue Dec 3, 2023 · 4 comments
Closed
Tracked by #1221

Generated documentation should include feature-gated APIs #992

bugadani opened this issue Dec 3, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@bugadani
Copy link
Contributor

bugadani commented Dec 3, 2023

the S3 docs for example don't indicate that there is a #[main] macro (or a whole embassy support module) provided by the crate.

@github-project-automation github-project-automation bot moved this to Todo in esp-rs Dec 3, 2023
@jessebraham jessebraham self-assigned this Dec 4, 2023
@jessebraham jessebraham added the documentation Improvements or additions to documentation label Dec 4, 2023
@jessebraham
Copy link
Member

Probably not going to do this for the upcoming releases (hopefully coming this week), but will get it done for the next round. Would like to see #976 either merged or closed before I do any work here, as that will change things a fair bit.

@jessebraham jessebraham added the status:needs-attention This should be prioritized label May 29, 2024
@jessebraham jessebraham removed their assignment Jul 11, 2024
@tom-borcin tom-borcin removed the status:needs-attention This should be prioritized label Jul 15, 2024
@jessebraham
Copy link
Member

At least the main macro has been moved to esp-hal-embassy now, and we do enable the ci feature when building documentation for esp-hal, so I believe this issue can be closed. If there are any APIs which are still not present in the documentation please feel free to re-open this issue, or to open a new one.

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jul 31, 2024
@bjoernQ
Copy link
Contributor

bjoernQ commented Jul 31, 2024

I agree this is done.

I wonder if we should have #![feature(doc_auto_cfg)] - the downside is that we have a lot of cfgs for chip-specific things so we end up with something like this, then:

image

I guess this might be more confusing to users than it helps

Ah ok ... found something.

We could have #![feature(doc_cfg)] and for the feature-gated items we could do something like this:

#[doc(cfg(feature = "async"))]
#[cfg(feature = "async")]
pub mod asynch {
...
}

But certainly, another issue - do we have such an issue (can't find it) or should I create a new one. Probably we should also say something about that in the HAL-developer docs

@jessebraham
Copy link
Member

We could have #![feature(doc_cfg)] and for the feature-gated items we could do something like this:

#[doc(cfg(feature = "async"))]
#[cfg(feature = "async")]
pub mod asynch {
...
}

But certainly, another issue - do we have such an issue (can't find it) or should I create a new one. Probably we should also say something about that in the HAL-developer docs

There's already a task in the documentation improvements issue for this, it just never got its own issue opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Archived in project
Development

No branches or pull requests

4 participants