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

The test-util feature depends on rt, sync, and time #4036

Merged
merged 1 commit into from
Aug 12, 2021

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Aug 12, 2021

Fixes #4035

Motivation

The build will fail for a crate that uses tokio with the test-util feature but not the rt, sync, and time features.

Solution

Add the features dependencies to Cargo.toml

Tests

This bug was revealed by running cargo hack check --feature-powerset --no-dev-deps. However, that command takes 205 minutes with this patch, and even longer without it, so it can't be added to CI.

@taiki-e
Copy link
Member

taiki-e commented Aug 12, 2021

Thanks!

This bug was revealed by running cargo hack check --feature-powerset --no-dev-deps. However, that command takes 205 minutes with this patch, and even longer without it, so it can't be added to CI.

Probably we can use --feature-powerset + --depth 2, like hyper (hyperium/hyper#2423) and futures (rust-lang/futures-rs#2277).

@Darksonn Darksonn merged commit 032c55e into tokio-rs:master Aug 12, 2021
@Darksonn Darksonn mentioned this pull request Aug 12, 2021
@asomers asomers deleted the powerset branch August 13, 2021 02:35
carllerche pushed a commit that referenced this pull request Sep 13, 2022
As has been pointed out a few times in the past (e.g., #4036 (comment)), each-feature 
is not sufficient for features check.

Ideally, we'd like to check all combinations of features, but there are too many
combinations. So limit the max number of simultaneous feature flags to 2 by --depth
option. I think this should be sufficient in most cases as @carllerche said in
taiki-e/cargo-hack#58.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tokio's test-util feature depends on rt, sync, and time
3 participants