From fa161e9a380c530363c3eb72c9917e4db88287e0 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 13 Jul 2020 21:20:52 +0100 Subject: refactor(3p/nix/libexpr): Remove the nix::Symbol default constructor Having a default constructor for this causes a variety of annoying situations across the codebase in which this is initialised to an unexpected value, leading to constant guarding against those conditions. It turns out there's actually no intrinsic reason that this default constructor needs to exist. The biggest one was addressed in CL/1138 and this commit cleans up the remaining bits. Change-Id: I4a847f50bc90e72f028598196592a7d8730a4e01 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1139 Reviewed-by: isomer Tested-by: BuildkiteCI --- third_party/nix/src/libexpr/eval.hh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'third_party/nix/src/libexpr/eval.hh') diff --git a/third_party/nix/src/libexpr/eval.hh b/third_party/nix/src/libexpr/eval.hh index 9e4e500b4745..11cc295b230d 100644 --- a/third_party/nix/src/libexpr/eval.hh +++ b/third_party/nix/src/libexpr/eval.hh @@ -62,10 +62,13 @@ class EvalState { SymbolTable symbols; const Symbol sWith, sOutPath, sDrvPath, sType, sMeta, sName, sValue, sSystem, - sOverrides, sOutputs, sOutputName, sIgnoreNulls, sFile, sLine, sColumn, - sFunctor, sToString, sRight, sWrong, sStructuredAttrs, sBuilder, sArgs, - sOutputHash, sOutputHashAlgo, sOutputHashMode; - Symbol sDerivationNix; + sOutputs, sOutputName, sIgnoreNulls, sFile, sLine, sColumn, sFunctor, + sToString, sRight, sWrong, sStructuredAttrs, sBuilder, sArgs, sOutputHash, + sOutputHashAlgo, sOutputHashMode; + + // Symbol representing the path to the built-in 'derivation.nix' + // file, set during primops initialisation. + std::optional sDerivationNix; /* If set, force copying files to the Nix store even if they already exist there. */ -- cgit 1.4.1