flag-frenzy
is an advanced feature flag testing tool for Cargo, perfect for large projects and continuous integration. It checks combinations of feature flags for crates within a workspace, filtering them by configurable rules.
You may be interested in these great, simpler alternatives:
flag-frenzy
was created to test feature flags for crates within the Bevy game engine. Originally it was a Github Actions job that ran cargo-all-features
(source), but quickly issues arose with out-of-memory errors and insufficient feature configuration.
The flag-frenzy
you know of today was written from scratch with the previous section's issues in mind. Specifically, it offers:
- Lazy combinations with
Iterator
- Since combinations are exponential, you would run out of memory if you tried to compute them all ahead of time. Instead,
flag-frenzy
uses anIterator
to only compute a combination when it is needed, and drops the value when it is done.
- Since combinations are exponential, you would run out of memory if you tried to compute them all ahead of time. Instead,
- Expressive feature configuration with rules
- Easily express complex feature requirements, such as: "
feature1
requiresfeature2
orfeature3
" and "feature4
andfeature5
are incompatible, unlessfeature6
is enabled." - This allows you to test only unintended behavior with feature flags, and skip the combinations that you intended to not work.
- Easily express complex feature requirements, such as: "
- Split up work into chunks that can be distributed across multiple processes in parallel.
- This was re-implemented from
cargo-all-features
because it drastically decreases the time required is check a workspace. - Note that this is on a best-effort basis: individual crates cannot be subdivided, and it does not account for rules and other filters. See #14 for more information.
- This was re-implemented from
- Colorful output and failure reports that help diagnose exactly which combinations raise errors.
Please see the documentation!
- #14298
bevy_window
failing withserialize
feature. - #14430
bevy_ui
failing withoutbevy_text
. - #14469
bevy_winit
failing withoutserialize
feature. - #14486
bevy_gltf
failing withpbr_multi_layer_material_textures
orpbr_anisotropy_texture
. - #14736
bevy_dev_tools
failing withoutbevy_gizmos
enabling itsbevy_render
feature. - #15515
bevy
failing withspirv_shader_passthrough
feature.