Feature flags used in Firefox Source Code

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Feature flags used in Firefox Source Code

Akond Rahman
Greetings Firefox Contributors,

I am looking into the usage of feature flags of open source software projects and I was wondering where I can find a list of all the feature flags used in Firefox source code. Feature flags are also referred to 'feature switches'; example: for  Google Chrome they are listed here: http://peter.sh/experiments/chromium-command-line-switches/

Can you please direct me where I can find the necessary resources?

- Akond
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: Feature flags used in Firefox Source Code

Boris Zbarsky
On 7/26/16 9:09 AM, Akond Rahman wrote:
> I am looking into the usage of feature flags of open source software projects and I was wondering where I can find a list of all the feature flags used in Firefox source code.

There is no canonical list, because code can just check a preference
value and doesn't have to register the preference name anywhere.

That said, it's considered good practice to put all the relevant
preference names, with their default values, in
<https://dxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js>.
  Note that many of these may not be documented in this file; you would
have to search for those preference names on the web or in the codebase
to figure out what they do.

-Boris
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: Feature flags used in Firefox Source Code

juan.hoyosr
Does it make sense to identify feature flags based on release heuristics? I believe these could help distinguishing a good proportion of experimental, ops and release toggles [1] while ignoring the configuration preferences:

* If a pref is a experimental feature as in [2].
* If a pref is affected by a compiler flag that translates to an unstable build channel like Nightly (NIGHTLY_BUILD) and the Developer Edition (MOZ_DEV_EDITION). See [3].
* If a boolean pref under RELEASE_OR_BETA, EARLY_BETA_OR_EARLIER or no compiler flag at all, expresses a disabled feature (e.g. /.enabled",\s+false/ or /.disabled",\s+true/).

Best,

Juan Hoyos

[1]: https://martinfowler.com/articles/feature-toggles.html#CategoriesOfToggles
[2]: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Experimental_features
[3]: https://wiki.mozilla.org/Platform/Channel-specific_build_defines

On Tuesday, July 26, 2016 at 9:03:32 AM UTC-5, Boris Zbarsky wrote:

> On 7/26/16 9:09 AM, Akond Rahman wrote:
> > I am looking into the usage of feature flags of open source software projects and I was wondering where I can find a list of all the feature flags used in Firefox source code.
>
> There is no canonical list, because code can just check a preference
> value and doesn't have to register the preference name anywhere.
>
> That said, it's considered good practice to put all the relevant
> preference names, with their default values, in
> <https://dxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js>.
>   Note that many of these may not be documented in this file; you would
> have to search for those preference names on the web or in the codebase
> to figure out what they do.
>
> -Boris
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds