On Thu, 2023-09-21 at 11:06 +0200, Robert Munteanu wrote: > On Thu, 2023-09-21 at 09:07 +0200, Christian Schneider wrote: > > He proposed a nice alternative to simply use "toggle.FT-SLING-1234" > > scheme > > for the Condition ids. > > I think I am still missing context, sorry for being dense :-) > > What does using the toggle mean for a Sling module? I am not sure if > and how we need to explicitly add these conditions to the source > code.
Christian and I had a brief chat and I think I get it know :-) There are two main ways of using OSGi Conditions 1. as a condition for activating OSGi DS components 2. as an optional service reference for OSGi DS components The first one can be done declaratively but both work programatically, i.e. declare a reference and check at runtime if the condition is present. I personally think that this is fine, given that we document this usage clearly and we have a proper naming convention for it (Christian already proposed one). We should also clarify the relation between using 'toggle conditions' and the existing feature flags module [1][2]. Christian, please fill in anything that I might've missed. Thanks, Robert [1]: https://github.com/apache/sling-org-apache-sling-featureflags [2]: https://sling.apache.org/documentation/the-sling-engine/featureflags.html