libexpr: Introduce Deprecated features

They are like experimental features, but opt-in instead of opt-out. They
will allow us to gracefully remove language features. See #437

Change-Id: I9ca04cc48e6926750c4d622c2b229b25cc142c42
This commit is contained in:
piegames
2024-08-17 19:47:51 +02:00
parent 1c080a8239
commit 49d61b2e4b
22 changed files with 468 additions and 54 deletions
+2 -2
View File
@@ -26,9 +26,9 @@ namespace nix {
, state({}, store)
{
}
Value eval(std::string input, bool forceValue = true, const ExperimentalFeatureSettings & xpSettings = experimentalFeatureSettings) {
Value eval(std::string input, bool forceValue = true, const FeatureSettings & fSettings = featureSettings) {
Value v;
Expr & e = state.parseExprFromString(input, state.rootPath(CanonPath::root), xpSettings);
Expr & e = state.parseExprFromString(input, state.rootPath(CanonPath::root), fSettings);
state.eval(e, v);
if (forceValue)
state.forceValue(v, noPos);