Skip to content

Enable All Except A Specific Feature From CLI #11467

@tustvold

Description

@tustvold

Problem

Within the arrow repository we have a workspace with a moderate number of library crates, each with their own features. In CI we would like to enable all features to ensure we run all the tests, unfortunately one of the features "simd" is only available on nightly compilers.

This leads to an error prone approach of having to list every feature apart from the one that can't be run on stable

cargo test -p arrow --features=force_validate,prettyprint,ipc_compression,ffi,dyn_cmp_dict,dyn_arith_dict,chrono-tz

It is not uncommon to accidentally miss a feature out from this list, especially as this has to be duplicated not only for cargo test but also the various cargo check and cargo clippy commands.

Proposed Solution

I would like to be able to use something like

cargo test --all-features-except simd

Which would enable all features except those listed

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions