Skip to content

Commit

Permalink
display experimental feature note at the top
Browse files Browse the repository at this point in the history
we have to enable the new `fetchTree` experimental feature to render it
at all. this was a bug introduced when adding that new feature flag.
  • Loading branch information
fricklerhandwerk committed Dec 4, 2023
1 parent f825180 commit 7fcf764
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
13 changes: 10 additions & 3 deletions doc/manual/generate-builtins.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ let
showBuiltin = name: { doc, args, arity, experimental-feature }:
let
experimentalNotice = optionalString (experimental-feature != null) ''
This function is only available if the [${experimental-feature}](@docroot@/contributing/experimental-features.md#xp-feature-${experimental-feature}) experimental feature is enabled.
> **Note**
>
> This function is only available if the [`${experimental-feature}` experimental feature](@docroot@/contributing/experimental-features.md#xp-feature-${experimental-feature}) is enabled.
>
> For example, include the following in [`nix.conf`](@docroot@/command-ref/conf-file.md):
>
> ```
> extra-experimental-features = ${experimental-feature}
> ```
'';
in
squash ''
Expand All @@ -17,10 +25,9 @@ let
</dt>
<dd>
${doc}
${experimentalNotice}
${doc}
</dd>
'';
listArgs = args: concatStringsSep " " (map (s: "<var>${s}</var>") args);
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/generate-settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ let
else "`${setting}`";
# separate body to cleanly handle indentation
body = ''
${description}
${experimentalFeatureNote}
${description}
**Default:** ${showDefault documentDefault defaultValue}
${showAliases aliases}
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/generate-store-info.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ let
result = squash ''
# ${name}
${doc}
${experimentalFeatureNote}
${doc}
## Settings
${showSettings { prefix = "store-${slug}"; inherit inlineHTML; } settings}
Expand Down
1 change: 1 addition & 0 deletions src/nix/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ void mainWrapped(int argc, char * * argv)
Xp::Flakes,
Xp::FetchClosure,
Xp::DynamicDerivations,
Xp::FetchTree,
};
evalSettings.pureEval = false;
EvalState state({}, openStore("dummy://"));
Expand Down

0 comments on commit 7fcf764

Please sign in to comment.