bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.4k stars 3.59k forks source link

Simplify CI script by removing use of bitflags #8421

Closed alice-i-cecile closed 1 year ago

alice-i-cecile commented 1 year ago

What problem does this solve or what need does it fill?

Bitflags are relatively obscure, rely on an extra dependency, and are hard to immediately understand and grok.

We have no need for this complexity (or theoretical performance) in our CI scripts. Removing dependencies is always nice too.

What solution would you like?

Remove them in favor of a HashSet + enums approach, as I did in my Bevy-inspired CI setup here.

What alternative(s) have you considered?

We could use strum or a first-party equivalent to generate the complete list of enum variants.

mockersf commented 1 year ago

It won't remove a dependency for Bevy contributors, as bitflags is a dependency of Bevy.

Enums are very much not the right tool for this, and would increase complexity, as can be seen in your PR...