about summary refs log tree commit diff
path: root/third_party/nix/src/tests/attr-set.cc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-05-19 r/4098 chore(3p/nix): unvendor tvix 0.1Vincent Ambo1-71/+0
Nothing is using this now, and we'll likely never pick this up again, but we learned a lot in the process. Every now and then this breaks in some bizarre way on channel bumps and it's just a waste of time to maintain that. Change-Id: Idcf2f5acd4ca7070ce18d7149cbfc0d967dc0a44 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5632 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Autosubmit: tazjin <tazjin@tvl.su>
2020-11-28 r/1948 refactor(tvix): Centralize arbitrary definitionsGriffin Smith1-86/+2
To make it easier for future tests to use the arbitrary specialisations we've defined for some nix types, centralize them all in a single arbitrary.hh header file. Change-Id: I767f27949cfe7ec55c79901f7d7aa538d2f98c6b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2182 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-08-17 r/1658 refactor(tvix): always pass Bindings by ptr, use shared/unique_ptrKane York1-17/+13
Value now carries a shared_ptr<Bindings>, and all Bindings constructors return a unique_ptr<Bindings>. The test that wanted to compare two Bindings by putting them into Values has been modified to use the new Equal() method on Bindings (extracted from EvalState). Change-Id: I8dfb60e65fdabb717e3b3e5d56d5b3fc82f70883 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1744 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: tazjin <mail@tazj.in>
2020-08-14 r/1646 refactor(tvix): completely remove boehm gcKane York1-3/+2
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
2020-08-06 r/1610 refactor(tvix): Use absl::btree_map for DerivationOutputsVincent Ambo1-0/+1
This container implementation is much faster than std::map. We have stuck to an ordered container because it's unclear whether the accesses of this field (of which there are *many*) are actually ordering dependent. Also includes an Arbitrary implementation for absl::btree_map (for any K, V that are also Arbitrary). Change-Id: I04f58ca0ce32b9ae1759313b01508b0e44bae793 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1683 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2020-08-03 r/1557 refactor(3p/nix): Only initialise garbage-collector where neededVincent Ambo1-1/+1
Only libexpr depends on the garbage collector, specifically only instantiations of EvalState actually require the GC to be initialised. Rather than always starting it for the whole program, even if it is not needed, this change moves the GC initialisation into libexpr, guarded by absl::call_once. This should make it possible to run the nix daemon without the garbage collector interfering, granted that things are correcty separated and the daemon does not actually invoke the evaluator. Based on my investigation so far, the daemon logic itself does not require libexpr to be present at all - so I think it is safe - but the current monobinary might have some tricks up its sleeve that will cause problems for us. We can deal with those if they arise. Relates to https://b.tvl.fyi/issues/30 Change-Id: I61c745f96420c02e089bd3c362ac3ccb117d3073 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1584 Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu> Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-08-01 r/1534 fix(3p/nix): revert "apply all clang-tidy fixes"Kane York1-3/+3
This reverts commit ef54f5da9fa30b5c302f2a49595ee5d041f9706a. Resolved conflicts: third_party/nix/src/libexpr/eval.cc third_party/nix/src/libstore/builtins/fetchurl.cc third_party/nix/src/libstore/references.cc third_party/nix/src/libutil/hash.cc third_party/nix/src/nix-daemon/nix-daemon.cc Change-Id: Ib9cf6e96a79a23bde3983579ced3f92e530cb011 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1547 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2020-07-27 r/1495 fix(3p/nix): apply all clang-tidy fixesKane York1-3/+3
Change-Id: I265e763393422ee1881653527c91024458060825 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1432 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-07-19 r/1395 test(3p/nix): Add property tests for attribute setGriffin Smith1-0/+159
Add a set of property tests for the attribute set (Bindings) class checking that the Merge operation satisfies the monoid laws. This will hopefully become useful to make sure we're not breaking the language semantics as we work towards optimizing or replacing the implementation, but also serves as a test bed for adding rapidcheck-based property tests to the codebase. Change-Id: I1b4b7b6503d08d80c1c5a8f9408fd4b787d00e8e Reviewed-on: https://cl.tvl.fyi/c/depot/+/1283 Reviewed-by: isomer <isomer@tvl.fyi> Tested-by: BuildkiteCI