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

Update CONTRIBUTING.md with recommended commands for building docs #6475

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

dtolnay
Copy link
Contributor

@dtolnay dtolnay commented Apr 10, 2024

Motivation

As discussed in #6469.

Solution

  • Delete the version of the command that doesn't have --cfg tokio_unstable, as proposed by @Darksonn in the link above.
  • Add --open, as this is most often what one would want. I am interested in feedback whether surrounding this flag in square brackets is self-explanatory enough to indicate that this flag is optional, or if we should just show it without the brackets, or entirely remove --open, or mention it in prose only.
  • Mention cargo +nightly docs-rs with a brief explanation. It is more memorable than the RUSTDOCFLAGS way, and applicable to repos outside of Tokio too.

@mox692 mox692 added the A-readme Area: Documentation that isn't part of any crate such as README.md or CONTRIBUTING.md label Apr 11, 2024
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@Darksonn Darksonn merged commit 43de364 into tokio-rs:master Apr 11, 2024
80 checks passed
@dtolnay dtolnay deleted the contributingdocs branch April 11, 2024 14:47

```
RUSTDOCFLAGS="--cfg docsrs --cfg tokio_unstable" RUSTFLAGS="--cfg docsrs --cfg tokio_unstable" cargo +nightly doc --all-features
cargo install cargo-docs-rs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be cargo install cargo-docs-rs --locked? (Saving users from install pain caused by any upstream dependency problems).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use cargo binsrall cargo-docs-rs to avoid cost of building the dep.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think --locked is a good idea, but I think we should not assume that developers are installing binstall.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Anyone that has installed binstall would know just use binstall generally, it's the newer users that often don't know to use --locked that can cause a support burden.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to accept a PR that adds --locked to the command.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-readme Area: Documentation that isn't part of any crate such as README.md or CONTRIBUTING.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants