-
Notifications
You must be signed in to change notification settings - Fork 70
Activate ansi feature for docs.rs #137
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
Conversation
Apply: https://users.rust-lang.org/t/how-to-document-optional-features-in-api-docs/64577/3 And update build script accordingly
Should be |
chrisduerr
left a comment
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.
Seems reasonable, I'll take a proper look once CI passes.
Generally if there's other features that are doc relevant, they should also be considered for this patch though. No reason to limit it to ansi.
warning: unresolved link to `Perform::advance`
Done.
I see only |
.builds/linux.yml
Outdated
| - rustdoc: | | ||
| $HOME/.cargo/bin/rustup toolchain install nightly -c rust-docs | ||
| cd vte | ||
| RUSTDOCFLAGS="--cfg docsrs -Dwarnings" $HOME/.cargo/bin/cargo +nightly doc --features=ansi --no-deps |
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.
Is there any reason to have the --cfg docsrs here? What exactly does it achieve? I'd assume rustdoc verification should be largely independent of target documentation platform.
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 am just following:
https://users.rust-lang.org/t/how-to-document-optional-features-in-api-docs/64577/3
You gave me a link to rand crate:
Any reason not to use doc_auto_cfg instead? (https://github.com/rust-random/rand/blob/master/src/lib.rs#L56)
And it seems that they do the same:
https://github.com/rust-random/rand/blob/7808f4e1f7d9578e3c08405b1f4e575720d58a51/.github/workflows/test.yml#L37
!
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'd assume rustdoc verification should be largely independent of target documentation platform.
unless you have doc stuff behind docsrs feature, it shouldn't really matter.
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.
unless you have doc stuff behind docsrs feature, it shouldn't really matter.
Which really shouldn't be the case tbh. I don't like singling out docsrs even though it's pretty much the "standard".
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 am almost sure that we can use any name instead of docsrs.
Because, it is used only to activate the nightly doc_auto_cfg feature.
Like in Cargo.toml
Apply:
https://users.rust-lang.org/t/how-to-document-optional-features-in-api-docs/64577/3
And update build script accordingly
Currently, there is a warning:
But I am not sure if the link should be on
Parser::advanceorPerfom::terminated.