Skip to content

Check combinations of Bevy's feature flags

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

TheBevyFlock/flag-frenzy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flag-frenzy

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:

History

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.

Features

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 an Iterator to only compute a combination when it is needed, and drops the value when it is done.
  • Expressive feature configuration with rules
    • Easily express complex feature requirements, such as: "feature1 requires feature2 or feature3" and "feature4 and feature5 are incompatible, unless feature6 is enabled."
    • This allows you to test only unintended behavior with feature flags, and skip the combinations that you intended to not work.
  • 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.
  • Colorful output and failure reports that help diagnose exactly which combinations raise errors.

Usage

Please see the documentation!

Trophies 🏆

  • #14298 bevy_window failing with serialize feature.
  • #14430 bevy_ui failing without bevy_text.
  • #14469 bevy_winit failing without serialize feature.
  • #14486 bevy_gltf failing with pbr_multi_layer_material_textures or pbr_anisotropy_texture.
  • #14736 bevy_dev_tools failing without bevy_gizmos enabling its bevy_render feature.
  • #15515 bevy failing with spirv_shader_passthrough feature.

About

Check combinations of Bevy's feature flags

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages