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

Add readme rustdoc tests to CI #68

Closed
LucioFranco opened this issue Oct 11, 2019 · 6 comments
Closed

Add readme rustdoc tests to CI #68

LucioFranco opened this issue Oct 11, 2019 · 6 comments
Labels
E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Help is requested to fix this issue. T-docs Improvements or additions to documentation

Comments

@LucioFranco
Copy link
Member

Motivation

Ensure the readme code compiles and is up to date.

Solution

I think we can call rustdoc directly and test the readme in its own CI stage.

@LucioFranco LucioFranco added T-docs Improvements or additions to documentation E-help-wanted Call for participation: Help is requested to fix this issue. E-easy Call for participation: Experience needed to fix: Easy / not much labels Oct 11, 2019
@senden9
Copy link

senden9 commented Oct 11, 2019

Alternative Idea: Use cargo-readme to auto-generate / check the readme.
This way the README file would be in sync with the tonic docs.rs page (modulo some header/footer stuff). Code examples would be tested automatically via cargo test because the live in a .rs file.

Bonus: You have the same nice "introduction information" no mater if new users land on the docs.rs page or this GitHub repository.

@LucioFranco
Copy link
Member Author

@senden9 the issue with that is we can't have fully-fledged examples in the main readme because it requires codegen and hooking into the rustdocs build.rs. I am considering just dropping examples from the readme since this will be hard and just point people to the examples crate.

@mattsre
Copy link
Contributor

mattsre commented Oct 21, 2019

@LucioFranco Is there currently any testing around the examples to ensure they are working? If not, is this something we should think about writing and adding into the CI?

@LucioFranco
Copy link
Member Author

So I am going to remove all examples from the readme. We will instead point to the examples crate which is checked via CI already. All doc examples are also checked via CI and cargo test.

@mattsre
Copy link
Contributor

mattsre commented Oct 22, 2019

Sounds good!

@LucioFranco
Copy link
Member Author

This can be closed now that we've removed examples from the readme, thanks for all the help!

brentalanmiller pushed a commit to brentalanmiller/tonic that referenced this issue Oct 6, 2023
* update to rustls 0.20

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* track simple renamings in rustls

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* use reader/writer methods

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* fix find and replace

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* use rustls-pemfile crate for pem file parsing

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* update misc api breakage

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* update client example with api changes

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* update server example with new APIs

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* update test_stream test

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* update tests to use new APIs

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* rm unused imports

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* handle rustls `WouldBlock` on eof

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* expect rustls to return wouldblock in tests

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* i think this is *actually* the right EOF behavior

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* bump version

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* okay that seems to fix it

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* update to track builder API changes

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* actually shutdown read side on close notify

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* Further updates to rustls 0.20 (hyperium#68)

* Adapt to RootCertStore API changes

* Handle UnexpectedEof errors

* Rename would_block to io_pending

* Try to make badssl test failures more verbose

* Rebuild AsyncRead impl

* Upgrade to current rustls

* Revert to using assert!()

* Update to rustls 0.20

* Forward rustls features

Co-authored-by: Dirkjan Ochtman <dirkjan@ochtman.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Experience needed to fix: Easy / not much E-help-wanted Call for participation: Help is requested to fix this issue. T-docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants