diff --git a/src/libutil/config.cc b/src/libutil/config.cc index 8abf4bc23..9946bed78 100644 --- a/src/libutil/config.cc +++ b/src/libutil/config.cc @@ -341,8 +341,10 @@ template<> std::set BaseSetting res; for (auto & s : tokenizeString(str)) { - if (auto thisXpFeature = parseExperimentalFeature(s); thisXpFeature) + if (auto thisXpFeature = parseExperimentalFeature(s)) res.insert(thisXpFeature.value()); + else if (stabilizedFeatures.count(s)) + debug("experimental feature '%s' is now stable", s); else warn("unknown experimental feature '%s'", s); } diff --git a/src/libutil/experimental-features.cc b/src/libutil/experimental-features.cc index 8ecf1e92b..b54a0cdc5 100644 --- a/src/libutil/experimental-features.cc +++ b/src/libutil/experimental-features.cc @@ -70,16 +70,6 @@ constexpr std::array xpFeatureDetails )", .trackingUrl = "https://github.com/NixOS/nix/milestone/42", }, - { - .tag = Xp::Flakes, - .name = "flakes", - .description = R"( - *Enabled for Determinate Nix Installer users since 2.19* - - See the manual entry for [`nix flake`](@docroot@/command-ref/new-cli/nix3-flake.md) for details. - )", - .trackingUrl = "https://github.com/NixOS/nix/milestone/27", - }, { .tag = Xp::FetchTree, .name = "fetch-tree", @@ -302,12 +292,18 @@ constexpr std::array xpFeatureDetails static_assert( []() constexpr { for (auto [index, feature] : enumerate(xpFeatureDetails)) - if (index != (size_t)feature.tag) + if (index != (size_t) feature.tag) return false; return true; }(), "array order does not match enum tag order"); +/** + * A set of previously experimental features that are now considered + * stable. We don't warn if users have these in `experimental-features`. + */ +std::set stabilizedFeatures{"flakes"}; + const std::optional parseExperimentalFeature(const std::string_view & name) { using ReverseXpMap = std::map; diff --git a/src/libutil/experimental-features.hh b/src/libutil/experimental-features.hh index 1da2a3ff5..f195c232c 100644 --- a/src/libutil/experimental-features.hh +++ b/src/libutil/experimental-features.hh @@ -19,7 +19,6 @@ enum struct ExperimentalFeature { CaDerivations, ImpureDerivations, - Flakes, FetchTree, NixCommand, GitHashing, @@ -38,6 +37,8 @@ enum struct ExperimentalFeature VerifiedFetches, }; +extern std::set stabilizedFeatures; + /** * Just because writing `ExperimentalFeature::CaDerivations` is way too long */