mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Mark fetchTree
as unstable again
As discussed in our last meeting, we need a bit more time, but we are
"time boxing" the work left to do to ensure there is not unbounded
delay.
Rather than putting it back underneath `flakes`, though, put it
underneath its own `fetch-tree` experimental feature (which `flakes`
includes/implies). This signals our commitment to the plan to stabilize
it first without waiting to go through the rest of Flakes, and also will
give users a "release candidate" when we get closer to stabilization.
This reverts commit 4112dd1fc9
.
This commit is contained in:
parent
d854e8696b
commit
f0adb72c23
6 changed files with 27 additions and 4 deletions
|
@ -17,7 +17,8 @@
|
||||||
|
|
||||||
- `nix-shell` shebang lines now support single-quoted arguments.
|
- `nix-shell` shebang lines now support single-quoted arguments.
|
||||||
|
|
||||||
- `builtins.fetchTree` is now marked as stable.
|
- `builtins.fetchTree` is now unstable under its own experimental feature, [`fetch-tree`](@docroot@/contributing/experimental-features.md#xp-fetch-tree).
|
||||||
|
As described in the document for that feature, this is because we anticipate polishing it and then stabilizing it before the rest of Flakes.
|
||||||
|
|
||||||
- The interface for creating and updating lock files has been overhauled:
|
- The interface for creating and updating lock files has been overhauled:
|
||||||
|
|
||||||
|
|
|
@ -228,6 +228,7 @@ static RegisterPrimOp primop_fetchTree({
|
||||||
```
|
```
|
||||||
)",
|
)",
|
||||||
.fun = prim_fetchTree,
|
.fun = prim_fetchTree,
|
||||||
|
.experimentalFeature = Xp::FetchTree,
|
||||||
});
|
});
|
||||||
|
|
||||||
static void fetch(EvalState & state, const PosIdx pos, Value * * args, Value & v,
|
static void fetch(EvalState & state, const PosIdx pos, Value * * args, Value & v,
|
||||||
|
|
|
@ -330,9 +330,13 @@ 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); thisXpFeature) {
|
||||||
res.insert(thisXpFeature.value());
|
res.insert(thisXpFeature.value());
|
||||||
else
|
// FIXME: Replace this hack with a proper notion of
|
||||||
|
// experimental feature implications/dependencies.
|
||||||
|
if (thisXpFeature.value() == Xp::Flakes)
|
||||||
|
res.insert(Xp::FetchTree);
|
||||||
|
} else
|
||||||
warn("unknown experimental feature '%s'", s);
|
warn("unknown experimental feature '%s'", s);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -74,6 +74,21 @@ constexpr std::array<ExperimentalFeatureDetails, numXpFeatures> xpFeatureDetails
|
||||||
flake`](@docroot@/command-ref/new-cli/nix3-flake.md) for details.
|
flake`](@docroot@/command-ref/new-cli/nix3-flake.md) for details.
|
||||||
)",
|
)",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.tag = Xp::FetchTree,
|
||||||
|
.name = "fetch-tree",
|
||||||
|
.description = R"(
|
||||||
|
Enable the use of the [`fetchTree`](@docroot@/language/builtins.md#builtins-fetchTree) built-in function in the Nix language.
|
||||||
|
|
||||||
|
`fetchTree` exposes a larger suite of fetching functionality in a more systematic way.
|
||||||
|
The same fetching functionality is always used for for
|
||||||
|
[`flakes`](#xp-feature-flakes).
|
||||||
|
|
||||||
|
This built-in was previously guarded by the `flakes` experimental feature because of that overlap,
|
||||||
|
but since the plan is to work on stabilizing this first (due 2024 Q1), we are putting it underneath a separate feature.
|
||||||
|
Once we've made the changes we want to make, enabling just this feature will serve as a "release candidate" --- allowing users to try out the functionality we want to stabilize and not any other functionality we don't yet want to, in isolation.
|
||||||
|
)",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.tag = Xp::NixCommand,
|
.tag = Xp::NixCommand,
|
||||||
.name = "nix-command",
|
.name = "nix-command",
|
||||||
|
|
|
@ -20,6 +20,7 @@ enum struct ExperimentalFeature
|
||||||
CaDerivations,
|
CaDerivations,
|
||||||
ImpureDerivations,
|
ImpureDerivations,
|
||||||
Flakes,
|
Flakes,
|
||||||
|
FetchTree,
|
||||||
NixCommand,
|
NixCommand,
|
||||||
RecursiveNix,
|
RecursiveNix,
|
||||||
NoUrlLiterals,
|
NoUrlLiterals,
|
||||||
|
|
|
@ -50,7 +50,8 @@ exp_cores=$(nix show-config | grep '^cores' | cut -d '=' -f 2 | xargs)
|
||||||
exp_features=$(nix show-config | grep '^experimental-features' | cut -d '=' -f 2 | xargs)
|
exp_features=$(nix show-config | grep '^experimental-features' | cut -d '=' -f 2 | xargs)
|
||||||
[[ $prev != $exp_cores ]]
|
[[ $prev != $exp_cores ]]
|
||||||
[[ $exp_cores == "4242" ]]
|
[[ $exp_cores == "4242" ]]
|
||||||
[[ $exp_features == "flakes nix-command" ]]
|
# flakes implies fetch-tree
|
||||||
|
[[ $exp_features == "fetch-tree flakes nix-command" ]]
|
||||||
|
|
||||||
# Test that it's possible to retrieve a single setting's value
|
# Test that it's possible to retrieve a single setting's value
|
||||||
val=$(nix show-config | grep '^warn-dirty' | cut -d '=' -f 2 | xargs)
|
val=$(nix show-config | grep '^warn-dirty' | cut -d '=' -f 2 | xargs)
|
||||||
|
|
Loading…
Reference in a new issue