nix-super/src/libexpr/tests
polykernel a382919d7d
primops: lazy evaluation of replaceStrings replacements
The primop `builtins.replaceStrings` currently always strictly evaluates the
replacement strings, however time and space are wasted for their computation
if the corresponding pattern do not occur in the input string. This commit
makes the evaluation of the replacement strings lazy by deferring their
evaluation to when the corresponding pattern are matched and memoize the result
for efficient retrieval on subsequent matches.

The testcases for replaceStrings was updated to check for lazy evaluation
of the replacements. A note was also added in the release notes to
document the behavior change.
2023-05-25 18:35:23 -04:00
..
value Fix some bounds in rapid check instances 2023-05-15 10:41:44 -04:00
derived-path.cc Create EvalState::coerceToDerivedPath 2023-05-15 09:03:37 -04:00
error_traces.cc primops: lazy evaluation of replaceStrings replacements 2023-05-25 18:35:23 -04:00
json.cc Use std::set<StringContextElem> not PathSet for string contexts 2023-04-21 01:05:49 -04:00
libexpr.hh Backport SourcePath from the lazy-trees branch 2023-04-06 13:15:50 +02:00
local.mk Backport SourcePath from the lazy-trees branch 2023-04-06 13:15:50 +02:00
primops.cc Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
trivial.cc Allow unit test infra to be reused across libs' tests 2023-01-29 13:52:57 -05:00