From a18d02e0b076a8a936c3c1660d93f941a9f3183f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 9 Aug 2006 15:08:47 +0000 Subject: [PATCH] * Print a warning that the subpath operator (~) is deprecated. --- src/libexpr/primops.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 0dd73a016..dfc565b43 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -197,6 +197,11 @@ static void processBinding(EvalState & state, Expr e, Derivation & drv, else if (matchNull(e)) ss.push_back(""); else if (matchSubPath(e, e1, e2)) { + static bool warn = false; + if (!warn) { + printMsg(lvlError, "warning: the subpath operator (~) is deprecated, use string concatenation (+) instead"); + warn = true; + } Strings ss2; processBinding(state, evalExpr(state, e1), drv, ss2); if (ss2.size() != 1)