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

Run with --all-features first, run with biggest feature combination early (first or second) if --all-features case is skipped #247

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Apr 2, 2024

Closes #246

The first and third commits are directly related to this behavior; the second commit is a fix to the related behavior.


--all-features case: --all-features case moved from the last to the first

From:

info: running `cargo check --no-default-features` on optional_deps (1/4)
info: running `cargo check --no-default-features --features real` on optional_deps (2/4)
info: running `cargo check --no-default-features --features renamed` on optional_deps (3/4)
info: running `cargo check --no-default-features --all-features` on optional_deps (4/4)

To:

info: running `cargo check --all-features` on optional_deps (1/4)
info: running `cargo check --no-default-features` on optional_deps (2/4)
info: running `cargo check --no-default-features --features real` on optional_deps (3/4)
info: running `cargo check --no-default-features --features renamed` on optional_deps (4/4)

non --all-features case: the biggest feature combination case (in this case, default,easytime) moved from the last to the second (last -> first when --exclude-no-default-features passed)

From:

info: running `cargo check --no-default-features` on weak_dep_features (1/4)
info: running `cargo check --no-default-features --features default` on weak_dep_features (2/4)
info: running `cargo check --no-default-features --features easytime` on weak_dep_features (3/4)
info: running `cargo check --no-default-features --features default,easytime` on weak_dep_features (4/4)

To:

info: running `cargo check --no-default-features` on weak_dep_features (1/4)
info: running `cargo check --no-default-features --features default,easytime` on weak_dep_features (2/4)
info: running `cargo check --no-default-features --features default` on weak_dep_features (3/4)
info: running `cargo check --no-default-features --features easytime` on weak_dep_features (4/4)

The reason it is not always run first is that there is no good way to implement it other than duplicating the code in 3 places or moving the "--no-default-features without --features" case to the last (I don't want to move it to the last because that is another "case where it is likely to find a problem").

@taiki-e taiki-e added the A-features Area: features (--feature-powerset, --each-feature, etc.) label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-features Area: features (--feature-powerset, --each-feature, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Start --feature-powerset with --all-features
1 participant