-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conversation
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.
Thank you.
|
||
``` | ||
RUSTDOCFLAGS="--cfg docsrs --cfg tokio_unstable" RUSTFLAGS="--cfg docsrs --cfg tokio_unstable" cargo +nightly doc --all-features | ||
cargo install cargo-docs-rs |
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.
Should this be cargo install cargo-docs-rs --locked
? (Saving users from install pain caused by any upstream dependency problems).
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.
could use cargo binsrall cargo-docs-rs
to avoid cost of building the dep.
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 think --locked is a good idea, but I think we should not assume that developers are installing binstall.
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.
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.
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'm happy to accept a PR that adds --locked
to the command.
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.
Motivation
As discussed in #6469.
Solution
--cfg tokio_unstable
, as proposed by @Darksonn in the link above.--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.cargo +nightly docs-rs
with a brief explanation. It is more memorable than the RUSTDOCFLAGS way, and applicable to repos outside of Tokio too.