Skip to content

ci: run doctests for unstable APIs #4562

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

Merged
merged 3 commits into from
Mar 11, 2022
Merged

ci: run doctests for unstable APIs #4562

merged 3 commits into from
Mar 11, 2022

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Mar 11, 2022

It turns out that the CI job for testing tokio_unstable features isn't
actually running doctests for tokio_unstable, just lib and integration
tests. This is because RustDoc is responsible for running doctests, and
it needs the unstable cfg passed to it separately from RUSTFLAGS.

This means that if the examples for unstable APIs are broken, CI won't
catch this, which is not great!

This commit changes the test-unstable CI job to pass --cfg tokio_unstable in RUSTDOCFLAGS as well as RUSTFLAGS. This way,
doctests for unstable APIs should actually run.

Verified

This commit was signed with the committer’s verified signature.
hawkw Eliza Weisman
It turns out that the CI job for testing `tokio_unstable` features isn't
actually running doctests for `tokio_unstable`, just lib and integration
tests. This is because RustDoc is responsible for running doctests, and
it needs the unstable cfg passed to it separately from `RUSTFLAGS`.

This means that if the examples for unstable APIs are broken, CI won't
catch this, which is not great!

This commit changes the `test-unstable` CI job to pass `--cfg
tokio_unstable` in `RUSTDOCFLAGS` as well as `RUSTFLAGS`. This way,
doctests for unstable APIs should actually run.

Verified

This commit was signed with the committer’s verified signature.
hawkw Eliza Weisman
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw
Copy link
Member Author

hawkw commented Mar 11, 2022

cool, found a typo in the runtime metrics doctests --- the system works! https://github.com/tokio-rs/tokio/runs/5515810817?check_suite_focus=true

@github-actions github-actions bot added the R-loom Run loom tests on this PR label Mar 11, 2022
@hawkw hawkw enabled auto-merge (squash) March 11, 2022 19:39

Verified

This commit was signed with the committer’s verified signature.
hawkw Eliza Weisman
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw merged commit 61e37c6 into master Mar 11, 2022
@hawkw hawkw deleted the eliza/unstable-ci-doctests branch March 11, 2022 20:13
@Darksonn Darksonn added T-docs Topic: documentation A-ci Area: The continuous integration setup labels Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: The continuous integration setup R-loom Run loom tests on this PR T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants