deprecate CA, dynamic, and impure derivations
ca derivations are what we're really after, but dynamic derivations must also go because they depend on ca derivations. we can't easily implement dynamic derivations any other way, so we remove them too. impure derivations build on the content-addressed infrastructure in ways we cannot easily detangle, so they too must go for time being. see #815 Change-Id: If61371736dfd89cc71a1b2ae5a005757c3cb9484
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
---
|
||||
synopsis: Deprecation of CA derivations, dynamic derivations, and impure derivations
|
||||
issues: [fj#815]
|
||||
cls: []
|
||||
significance: significant
|
||||
category: Miscellany
|
||||
credits: []
|
||||
---
|
||||
|
||||
Content-addressed derivations are now deprecated and slated for removal in Lix 2.94.
|
||||
We're doing this because the CA derivation system has been a known cause of problems
|
||||
and inconsistencies, is unmaintained, habitually makes improving the store code very
|
||||
difficult (or blocks such improvements outright), and is beset by a number of design
|
||||
flaws that in our opinion cannot be fixed without a full reimplementation from zero.
|
||||
Dynamic derivations and impure derivations are built on the CA derivation framework,
|
||||
and owing to this they too are deprecated and slated for removal in another release.
|
||||
+23
-2
@@ -10,6 +10,7 @@
|
||||
#include "lix/libutil/strings.hh"
|
||||
|
||||
#include "lix/libutil/config-impl.hh"
|
||||
#include <mutex>
|
||||
|
||||
namespace nix {
|
||||
|
||||
@@ -343,11 +344,31 @@ template<> std::string BaseSetting<StringSet>::to_string() const
|
||||
|
||||
template<> ExperimentalFeatures BaseSetting<ExperimentalFeatures>::parse(const std::string & str, const ApplyConfigOptions & options) const
|
||||
{
|
||||
auto warnDeprecated294 = [](std::once_flag & flag, std::string_view thing) {
|
||||
std::call_once(flag, [&] {
|
||||
warn(
|
||||
"The %s experimental feature is deprecated and will be removed in Lix 2.94. "
|
||||
"See https://git.lix.systems/lix-project/lix/issues/815 for more details.",
|
||||
thing
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
ExperimentalFeatures res{};
|
||||
for (auto & s : tokenizeString<StringSet>(str)) {
|
||||
if (auto thisXpFeature = parseExperimentalFeature(s); thisXpFeature)
|
||||
if (auto thisXpFeature = parseExperimentalFeature(s); thisXpFeature) {
|
||||
if (*thisXpFeature == Xp::CaDerivations) {
|
||||
static std::once_flag warned;
|
||||
warnDeprecated294(warned, s);
|
||||
} else if (*thisXpFeature == Xp::DynamicDerivations) {
|
||||
static std::once_flag warned;
|
||||
warnDeprecated294(warned, s);
|
||||
} else if (*thisXpFeature == Xp::ImpureDerivations) {
|
||||
static std::once_flag warned;
|
||||
warnDeprecated294(warned, s);
|
||||
}
|
||||
res = res | thisXpFeature.value();
|
||||
else
|
||||
} else
|
||||
warn("unknown experimental feature '%s'", s);
|
||||
}
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user