lix/src/libexpr
eldritch horrors c26599b143 libexpr: fix elided value counting in printer
using the total-attrs-printed and total-list-items-printed counters to
calculate how many attrs were elided only works properly if no nesting
is involved. once things do nest the global counter can exceed the size
of the currently printed object, leading to unsigned wrapping and great
overestimation of elided counts. counting locally in addition to global
counts fixes this.

these are functional tests because creating these objects requires the
evaluator to not be a huge amount of code, and we also want defaults to
be tested for cli usage.

fixes #14

Change-Id: Icb9a0cb21b2f4bacbc5e9dcdd8c0b9055b4088a7
2024-03-14 01:52:19 -06:00
..
flake Merge pull request #9925 from 9999years/fmt-cleanup 2024-03-09 07:00:13 -07:00
primops Merge pull request #9925 from 9999years/fmt-cleanup 2024-03-09 07:00:13 -07:00
value Merge pull request #9925 from 9999years/fmt-cleanup 2024-03-09 07:00:13 -07:00
attr-path.cc libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00
attr-path.hh Merge remote-tracking branch 'upstream/master' into source-path 2023-04-17 11:41:50 +02:00
attr-set.cc Don't pass Symbol by reference 2022-04-26 13:25:17 +02:00
attr-set.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
eval-cache.cc libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00
eval-cache.hh libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00
eval-error.cc Merge pull request #10066 from 9999years/print-all-frames 2024-03-09 10:17:26 -07:00
eval-error.hh Merge pull request #10066 from 9999years/print-all-frames 2024-03-09 10:17:26 -07:00
eval-inline.hh libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00
eval-settings.cc Merge pull request #4093 from matthewbauer/eval-system 2024-03-04 07:21:01 +01:00
eval-settings.hh Merge pull request #9914 from 9999years/debugger-on-trace 2024-03-09 10:17:26 -07:00
eval.cc remove ExprAttrs::AttrDef::inherited 2024-03-10 03:18:32 -06:00
eval.hh Merge pull request #10066 from 9999years/print-all-frames 2024-03-09 10:17:26 -07:00
fetchurl.nix fetchurl.nix: change other use of __impure 2022-09-16 01:54:24 -07:00
function-trace.cc Revert the enum struct change 2020-06-18 22:11:26 +00:00
function-trace.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
gc-small-vector.hh Merge pull request #9430 from hercules-ci/remove-vlas 2024-03-04 07:11:25 +01:00
get-drvs.cc remove getDerivations deduplication 2024-03-10 03:18:32 -06:00
get-drvs.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
imported-drv-to-derivation.nix Move some corepkgs into the nix binary 2020-03-11 16:57:48 +01:00
json-to-value.cc libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00
json-to-value.hh libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00
lexer.l Merge pull request #9925 from 9999years/fmt-cleanup 2024-03-09 07:00:13 -07:00
local.mk Merge pull request #9465 from obsidiansystems/build-dir 2024-03-04 07:11:25 +01:00
nix-expr.pc.in Fix building with GCC 9 2023-02-10 18:38:57 +01:00
nixexpr.cc evaluate inherit (from) exprs only once per directive 2024-03-10 03:18:32 -06:00
nixexpr.hh add doc comment justifying ExprInheritFrom 2024-03-10 03:18:32 -06:00
parser-state.hh remove ExprAttrs::AttrDef::inherited 2024-03-10 03:18:32 -06:00
parser.y evaluate inherit (from) exprs only once per directive 2024-03-10 03:18:32 -06:00
paths.cc Merge pull request #9172 from tfc/bad-moves 2024-03-04 04:41:52 +01:00
pos-idx.hh Move PodIdx to pos-idx.hh and PosTable to pos-table.hh 2024-03-09 04:47:05 -07:00
pos-table.hh Move PodIdx to pos-idx.hh and PosTable to pos-table.hh 2024-03-09 04:47:05 -07:00
primops.cc Merge pull request #10066 from 9999years/print-all-frames 2024-03-09 10:17:26 -07:00
primops.hh Merge pull request #7348 from thufschmitt/dont-use-vlas 2024-03-04 05:51:23 +01:00
print-ambiguous.cc util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
print-ambiguous.hh Unify and refactor value printing 2024-03-09 03:50:06 +01:00
print-options.hh prettyPrint -> shouldPrettyPrint 2024-03-09 07:20:23 -07:00
print.cc libexpr: fix elided value counting in printer 2024-03-14 01:52:19 -06:00
print.hh Merge pull request #9925 from 9999years/fmt-cleanup 2024-03-09 07:00:13 -07:00
repl-exit-status.hh :quit in the debugger should quit the whole program 2024-03-09 10:17:26 -07:00
search-path.cc src/libexpr/search-path.cc: avoid out-of-bounds read on string_view 2023-08-14 22:07:37 +01:00
search-path.hh Clean up SearchPath 2023-07-09 23:22:22 -04:00
symbol-table.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
value-to-json.cc util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
value-to-json.hh Use std::set<StringContextElem> not PathSet for string contexts 2023-04-21 01:05:49 -04:00
value-to-xml.cc util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
value-to-xml.hh Use std::set<StringContextElem> not PathSet for string contexts 2023-04-21 01:05:49 -04:00
value.hh libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00