diff options
author | Kane York <kanepyork@gmail.com> | 2020-08-13T22·18-0700 |
---|---|---|
committer | kanepyork <rikingcoding@gmail.com> | 2020-08-14T00·35+0000 |
commit | 72e61aa584c3e3bbafbdc539959a2db8e0f123ef (patch) | |
tree | d74d5ed8508ab9845812752c51451f870dcc482c /third_party/nix/src/nix | |
parent | d4f5fcef66beeff2e0cbd641ac83a5b2a67e3006 (diff) |
refactor(tvix): completely remove boehm gc r/1646
We have decided that leaking memory is a better fate than random, non-debuggable memory corruption. Future CLs will begin changing various fields to std::unique_ptr and std::shared_ptr. It turns out that disabling the GC does not have disasterous impact. The Nix evaluator only runs on the client CLI, never in any long- running process. Even the REPL does not leak too badly under this change, because it uses one EvalState for the duration of the REPL. Building an explicitly tracing garbage collector is likely in the future of this project, but that giant amount of work cannot be done under a nix evaluator that is constantly crashing. We need to restore development velocity here, and this is the best way we've figured out to do it. Change-Id: I2fcda8fcee853c15a9a5e22eca7c5a784bc2bf76 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1720 Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
Diffstat (limited to 'third_party/nix/src/nix')
-rw-r--r-- | third_party/nix/src/nix/repl.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/third_party/nix/src/nix/repl.cc b/third_party/nix/src/nix/repl.cc index 281b3c1e453f..85750b08cea4 100644 --- a/third_party/nix/src/nix/repl.cc +++ b/third_party/nix/src/nix/repl.cc @@ -22,9 +22,6 @@ #include "libutil/finally.hh" #include "nix/command.hh" -#define GC_INCLUDE_NEW -#include <gc/gc_cpp.h> - namespace nix { #define ESC_RED "\033[31m" @@ -35,7 +32,7 @@ namespace nix { #define ESC_CYA "\033[36m" #define ESC_END "\033[0m" -struct NixRepl : gc { +struct NixRepl { std::string curDir; EvalState state; Bindings* autoArgs; |