From f3165f48aa960a0167c403ec99320affd8425004 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 13 Jul 2020 20:52:35 +0100 Subject: refactor(3p/nix/libexpr): Make nix::AttrName a std::variant nix:AttrName was one of the few classes that relied on the default constructor of nix::Symbol (which I am trying to remove in a separate change). The class essentially represents the name of an attribute in a set, which is either just a string expression or a dynamically evaluated expression (e.g. string interpolation). Previously it would be constructed by only setting one of the fields and defaulting the other, now it is an explicit std::variant. Note that there are several code paths where not all eventualities are handled and this code is bug-for-bug compatible with those, except that unknown conditions (which should never work) are now throwing instead of silently doing ... something. The language tests pass with this change, and the depot derivations that I tested with evaluated successfully. Change-Id: Icf1ee60a5f8308f4ab18a82749e00cf37a938a8f Reviewed-on: https://cl.tvl.fyi/c/depot/+/1138 Reviewed-by: edef Reviewed-by: glittershark Tested-by: BuildkiteCI --- third_party/nix/src/nix-daemon/nix-daemon.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'third_party/nix/src/nix-daemon') diff --git a/third_party/nix/src/nix-daemon/nix-daemon.cc b/third_party/nix/src/nix-daemon/nix-daemon.cc index c7967307c1ba..da3d909f1820 100644 --- a/third_party/nix/src/nix-daemon/nix-daemon.cc +++ b/third_party/nix/src/nix-daemon/nix-daemon.cc @@ -16,6 +16,7 @@ #include #include "libmain/shared.hh" +#include "libproto/worker.pb.h" #include "libstore/derivations.hh" #include "libstore/globals.hh" #include "libstore/local-store.hh" @@ -27,7 +28,6 @@ #include "libutil/serialise.hh" #include "libutil/util.hh" #include "nix/legacy.hh" -#include "libproto/worker.pb.h" using namespace nix; -- cgit 1.4.1