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

make doctests fail on any warnings #466

Conversation

cosmicexplorer
Copy link
Contributor

@cosmicexplorer cosmicexplorer commented Jun 27, 2022

This is a useful setting to have on. We only have one doctest right now (for ProtocolAddress::new()), but this is useful when adding documentation in the constituent PRs of #467.

@jrose-signal
Copy link
Contributor

I'm leery of this for the same reason we don't use deny(warnings): it makes it harder to use different compiler releases (even if this one doesn't affect downstream clients the same way). Is there a way to set this from the command line instead, so we can put it in our CI config but leave local builds alone?

@cosmicexplorer
Copy link
Contributor Author

I totally hadn't considered how similar this is to deny(warnings) in general, and it's not clear how rustdoc can be made to read from cargo config, since #[doc] attributes do not seem to obviously have a way to be set except in the source code itself (looking at https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html#showing-warnings-in-doctests). I think I'll close this for now as I have had a lot of difficulty trying to figure this out and there doesn't seem to be a lot of benefit from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants