This commit is contained in:
Eelco Dolstra
2023-04-11 11:29:35 +02:00
committed by GitHub
parent 73eb6a2a57
commit deb7f4b466
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -382,11 +382,11 @@ struct ExperimentalFeatureSettings : Config {
experimental-features = nix-command flakes
```
Experimental features available:
The following experimental features are available:
{{#include experimental-features-shortlist.md}}
Experimental features are [further documented](@docroot@/contributing/experimental-features.md) in the contribution guide.
Experimental features are [further documented in the manual](@docroot@/contributing/experimental-features.md).
)"};
/**
+3 -2
View File
@@ -204,7 +204,7 @@ const std::optional<ExperimentalFeature> parseExperimentalFeature(const std::str
{
using ReverseXpMap = std::map<std::string_view, ExperimentalFeature>;
static std::unique_ptr<ReverseXpMap> reverseXpMap = [](){
static std::unique_ptr<ReverseXpMap> reverseXpMap = []() {
auto reverseXpMap = std::make_unique<ReverseXpMap>();
for (auto & xpFeature : xpFeatureDetails)
(*reverseXpMap)[xpFeature.name] = xpFeature.tag;
@@ -223,7 +223,8 @@ std::string_view showExperimentalFeature(const ExperimentalFeature tag)
return xpFeatureDetails[(size_t)tag].name;
}
nlohmann::json documentExperimentalFeatures() {
nlohmann::json documentExperimentalFeatures()
{
StringMap res;
for (auto & xpFeature : xpFeatureDetails)
res[std::string { xpFeature.name }] =