update readme (#21797)
[mono-project.git] / mono / utils / mono-experiments.def
blob9ec57b7c1ffb4b7f957241beb656d3317be8d91a
1 /*
2 * Mono Experiments.
4 * Experiments are UNSUPPORTED. Do not rely on experiments in production.
5 * Experiments are not guaranteed to be stable, backward compatible or
6 * available in future versions of Mono.
8 */
10 /* Defining experiments:
11 * use the EXPERIMENT(id,"GH link") format.
13 * id: a unique identifier for the experiment. Will be used in the
14 * MONO_EXPERIMENT=id1,id2,... environment variable to enable an experiment at
15 * runtime and a MONO_EXPERIMENT_id enumeration value that can be used to check
16 * for whether an experiment is enabled.
18 * GH Link: a URL of a GitHub tracking issue for the experiment. The issue is
19 * closed when the experiment is removed from Mono.
21 * To add a compile-time check for an experiment, see configure.ac macro AC_ARG_ENABLE(experiment,...)
22 * To add a new compile-time constant ENABLE_EXPERIMENT_myfeaturename:
23 * 1. Add eval "mono_experiment_test_enable_myfeaturename='yes'" to the mono_experiment_test_enable_all block
24 * 2. Add a block like
25 * if test "x$mono_experiment_test_enable_myfeaturename" = "xyes"; then
26 * AC_DEFINE(ENABLE_EXPERIMENT_myfeaturename, 1, [Enable experiment 'myfeaturename'])
27 * fi
28 * 3. use both `#if defined (ENABLE_EXPERIMENT_myfeaturename)` and
29 * `if (mono_experiment_enabled (MONO_EXPERIMENT_myfeaturename))` to check that the experiment
30 * is compiled in and also enabled at runtime.
31 * It is optional to add the compile-time check, but if you add it, add the runtime check too.
33 #if defined(ENABLE_EXPERIMENT_null)
34 EXPERIMENT(null,"https://github.com/mono/mono/issues/10877")
35 #endif