mirror of
https://github.com/NixOS/nix
synced 2025-07-01 20:51:48 +02:00
Actually remove the "flakes" experimental feature
To avoid annoying warnings, this is now a "stabilized" feature.
This commit is contained in:
parent
16c8f9016b
commit
50d7ce6c6a
3 changed files with 12 additions and 13 deletions
|
@ -341,8 +341,10 @@ template<> std::set<ExperimentalFeature> BaseSetting<std::set<ExperimentalFeatur
|
||||||
{
|
{
|
||||||
std::set<ExperimentalFeature> res;
|
std::set<ExperimentalFeature> res;
|
||||||
for (auto & s : tokenizeString<StringSet>(str)) {
|
for (auto & s : tokenizeString<StringSet>(str)) {
|
||||||
if (auto thisXpFeature = parseExperimentalFeature(s); thisXpFeature)
|
if (auto thisXpFeature = parseExperimentalFeature(s))
|
||||||
res.insert(thisXpFeature.value());
|
res.insert(thisXpFeature.value());
|
||||||
|
else if (stabilizedFeatures.count(s))
|
||||||
|
debug("experimental feature '%s' is now stable", s);
|
||||||
else
|
else
|
||||||
warn("unknown experimental feature '%s'", s);
|
warn("unknown experimental feature '%s'", s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,16 +70,6 @@ constexpr std::array<ExperimentalFeatureDetails, numXpFeatures> xpFeatureDetails
|
||||||
)",
|
)",
|
||||||
.trackingUrl = "https://github.com/NixOS/nix/milestone/42",
|
.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,
|
.tag = Xp::FetchTree,
|
||||||
.name = "fetch-tree",
|
.name = "fetch-tree",
|
||||||
|
@ -302,12 +292,18 @@ constexpr std::array<ExperimentalFeatureDetails, numXpFeatures> xpFeatureDetails
|
||||||
static_assert(
|
static_assert(
|
||||||
[]() constexpr {
|
[]() constexpr {
|
||||||
for (auto [index, feature] : enumerate(xpFeatureDetails))
|
for (auto [index, feature] : enumerate(xpFeatureDetails))
|
||||||
if (index != (size_t)feature.tag)
|
if (index != (size_t) feature.tag)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}(),
|
}(),
|
||||||
"array order does not match enum tag order");
|
"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<std::string> stabilizedFeatures{"flakes"};
|
||||||
|
|
||||||
const std::optional<ExperimentalFeature> parseExperimentalFeature(const std::string_view & name)
|
const std::optional<ExperimentalFeature> parseExperimentalFeature(const std::string_view & name)
|
||||||
{
|
{
|
||||||
using ReverseXpMap = std::map<std::string_view, ExperimentalFeature>;
|
using ReverseXpMap = std::map<std::string_view, ExperimentalFeature>;
|
||||||
|
|
|
@ -19,7 +19,6 @@ enum struct ExperimentalFeature
|
||||||
{
|
{
|
||||||
CaDerivations,
|
CaDerivations,
|
||||||
ImpureDerivations,
|
ImpureDerivations,
|
||||||
Flakes,
|
|
||||||
FetchTree,
|
FetchTree,
|
||||||
NixCommand,
|
NixCommand,
|
||||||
GitHashing,
|
GitHashing,
|
||||||
|
@ -38,6 +37,8 @@ enum struct ExperimentalFeature
|
||||||
VerifiedFetches,
|
VerifiedFetches,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern std::set<std::string> stabilizedFeatures;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Just because writing `ExperimentalFeature::CaDerivations` is way too long
|
* Just because writing `ExperimentalFeature::CaDerivations` is way too long
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue