libutil: enable Xp::Flakes, Xp::NixCommand and Xp::ReplFlake by default

This commit is contained in:
Max Headroom 2023-05-04 22:35:27 +02:00
parent 37f9639938
commit cb263a33b9

View file

@ -477,6 +477,17 @@ static GlobalConfig::Register rSettings(&experimentalFeatureSettings);
bool ExperimentalFeatureSettings::isEnabled(const ExperimentalFeature & feature) const bool ExperimentalFeatureSettings::isEnabled(const ExperimentalFeature & feature) const
{ {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-enum"
switch (feature) {
case ExperimentalFeature::Flakes:
case ExperimentalFeature::NixCommand:
case ExperimentalFeature::ReplFlake:
return true;
default:
break;
}
#pragma GCC diagnostic pop
auto & f = experimentalFeatures.get(); auto & f = experimentalFeatures.get();
return std::find(f.begin(), f.end(), feature) != f.end(); return std::find(f.begin(), f.end(), feature) != f.end();
} }