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

docs(iroh-net): Document cargo features needed for APIs #2759

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Conversation

flub
Copy link
Contributor

@flub flub commented Sep 30, 2024

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

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • [ ] Tests if relevant.
  • [ ] All breaking changes documented.

This uses the feature of docs.rs to enable showing which cargo
features need to be enabled for APIs.
Copy link

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

Copy link

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 68e88ab

@matheus23
Copy link
Contributor

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)"] }
Copy link
Contributor

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.tomls?

Copy link
Contributor Author

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.

Copy link
Contributor

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

@flub
Copy link
Contributor Author

flub commented Sep 30, 2024

I wish the docs action would work 😢

Not sure what happened. :/ (Am looking into this)

Oh, this action will also need to be fixed for this so it builds with RUSTFLAGS=--cfg iroh_docsrs. I guess we'll do that separately.

@flub flub added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit 5d92f49 Sep 30, 2024
27 checks passed
@flub flub deleted the flub/doc-features branch September 30, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants