Open nathaniel-brough opened 1 year ago
@trybka might have opinions about this!
We had some discussions about this and related issues in person yesterday. I thought I'd record some of my comments here for posterity:
cc_feature
has a dep
on another cc_feature
, it should "imply" it.In my opinion relying on the ordered feature list is better than using a depset (based on deps
between cc_features
) to order the flags.
[A, B, C]
, are we saying A
must be before both B
and C
, or only before B
and we tagged C
at the end? The depset is more precise about this).cc_feature
s. This is critical if the "common" cc_feature
s are to be reused by multiple projects that may require different flag ordering.def ordered_list(*args): return [*args]
?), and use it here. The usage of this macro will document, both to humans and to buildifier, that the order of the entries is significant.
We may want to have a feature depend on another. At the moment, there is no strict dependency tracking that is integrated into the cc_toolchains API. e.g. say we have two features, A, B.
Currently, there are two separate mechanisms to describe the relationships between these two features. The of A "requires" B then A cannot be enabled without B. But if A "implies" B then B is automatically enabled when A is.
The question is; do we need both of theses mechanisms or are these mechansims already possible using basic Bazel configurations e.g. selects and config_settings.
Do we want "dependant" features to automatically enable there dependants or do we want them to be enabled/disabled independantly.