Closed skunert closed 1 year ago
Q: do we want to allow arbitrary #[] macros eventually? I.e. copying derive over to the generated struct only and keeping any other ones on all items. But that's for another time I think.
Not sure I understand, how could this be used?
In this PR I introduce guarding of subsystems via features. Supported syntax:
Basically this allows re-use of one orchestra in scenarios where it is not needed to run all subsystems. The
#cfg
attribute macro currently supportsany
,all
,not
andfeature = "something"
.Limitations
Feature unification. The current implementation is not very useful when you have a large workspace, and different crates depend on the defined orchestra with different features enabled.
Performance depends on the number of unique cfg expressions defined in the crate. With the current design of the orchestra builder, I have to build distinct feature combinations for the builder. This scales with O(2^n) where n is the number of distinct feature expressions. I tested a bit and impact is starting to show at around 7 different feature expressions.