This section describes the notion of experimental features, and how it fits into the big picture of the development of Lix.

This section has not been updated for Lix development practices and should not be considered authoritative with respect to those; see the Lix wiki for more up-to-date information as it gets written https://wiki.lix.systems/books/lix-contributors. The technical content on this page is correct.

Experimental features are considered unstable, which means that they can be changed or removed at any time. Users must explicitly enable them by toggling the associated experimental feature flags. This allows accessing unstable functionality without unwittingly relying on it.

Experimental feature flags were first introduced in Nix 2.4. Before that, Nix did have experimental features, but they were not guarded by flags and were merely documented as unstable. This was a source of confusion and controversy.

A change in the Lix codebase should be guarded by an experimental feature flag if it is considered likely to be reverted or adapted in a backwards-incompatible manner after gathering more experience with it in practice.

Examples:

Experimental features have to be treated on a case-by-case basis. However, the standard workflow for an experimental feature is as follows:

The following diagram illustrates the process:

                  .------.
                  | idea |
                  '------'
                      |
       discussion, design, implementation
                      |
                      |     .-------.
                      |     |       |
                      v     v       |
               .--------------.  review
               | pull request |     |
               '--------------'     |
                   |     ^  |       |
                   |     |  '-------'
               .---'     '----.
               |              |
             merge       user feedback,
               |       (breaking) changes
               |              |
               '---.     .----'
                   |     |
                   v     |
               +--------------+
           .---| experimental |----.
           |   +--------------+    |
           |                       |
decision to stabilise      decision against
           |              keeping the feature
           |                       |
           v                       v
       +--------+             +---------+
       | stable |             | removed |
       +--------+             +---------+

Experimental features and RFCs both allow approaching substantial changes while minimizing the risk. However they serve different purposes:

This means that experimental features and RFCs are orthogonal mechanisms, and can be used independently or together as needed.

{{#include @generated@/../../../lix/libutil/experimental-feature-descriptions.md}}