-
Notifications
You must be signed in to change notification settings - Fork 184
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
docs(iroh-net): Document cargo features needed for APIs #2759
Conversation
This uses the feature of docs.rs to enable showing which cargo features need to be enabled for APIs.
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2759/docs/iroh/ Last updated: 2024-09-30T12:55:54Z |
I wish the docs action would work 😢 Not sure what happened. :/ (Am looking into this) |
# require a feature enabled when using `--cfg docsrs` which we can not | ||
# do. To enable for a crate set `#![cfg_attr(iroh_docsrs, | ||
# feature(doc_cfg))]` in the crate. | ||
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(iroh_docsrs)"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need to specify this feature in the individual Cargo.toml
s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it's not even allowed: they all have lints.workspace = true
so pick it up from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, that's complicated
Oh, this action will also need to be fixed for this so it builds with |
## Description This uses the feature of docs.rs to enable showing which cargo features need to be enabled for APIs. This is much friendlier for users. ## Breaking Changes None ## Notes & open questions I'm trying to do this for the entire workspace but for some reason am not getting this to work on other crates yet. This is all such a mystery and mess. Just get this in stable rust already and do this by default without needing extra annotations. I'll try and do the rest of the workspace still in a followup PR, but at least this might make the release so we get to see if it works on actual docs.rs as well. ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - ~~[ ] Tests if relevant.~~ - ~~[ ] All breaking changes documented.~~
Description
This uses the feature of docs.rs to enable showing which cargo
features need to be enabled for APIs. This is much friendlier for
users.
Breaking Changes
None
Notes & open questions
I'm trying to do this for the entire workspace but for some reason am
not getting this to work on other crates yet. This is all such a
mystery and mess. Just get this in stable rust already and do this by
default without needing extra annotations.
I'll try and do the rest of the workspace still in a followup PR, but
at least this might make the release so we get to see if it works on
actual docs.rs as well.
Change checklist
[ ] Tests if relevant.[ ] All breaking changes documented.