1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 11:11:03 -04:00
nix/src/libexpr
John Ericson e7c39ff00b Rework evaluator SingleDerivedPath infra
`EvalState::mkSingleDerivedPathString` previously contained its own
inverse (printing, rather than parsing) in order to validate what was
parsed. Now that is pulled out into its own separate function:
`EvalState::coerceToSingleDerivedPath`.

In additional that pulled out logic is deduplicated with
`EvalState::mkOutputString` via `EvalState::mkOutputStringRaw`, which is
itself deduplicated (and generalized) with
`DownstreamPlaceholder::mkOutputStringRaw`.

All these changes make the unit tests simpler.

(We would ideally write more unit tests for `mkSingleDerivedPathString`
`coerceToSingleDerivedPath` directly, but we cannot yet do that because
the IO in reading the store path won't work when the dummy store cannot
hold anything. Someday we'll have a proper in-memory store which will
work for this.)

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-08-14 08:44:50 -04:00
..
flake Merge pull request #8769 from edolstra/generalize-tarball-urls 2023-08-07 17:02:17 +02:00
primops Make the Derived Path family of types inductive for dynamic derivations 2023-08-10 00:08:32 -04:00
tests Rework evaluator SingleDerivedPath infra 2023-08-14 08:44:50 -04:00
value Make the Derived Path family of types inductive for dynamic derivations 2023-08-10 00:08:32 -04:00
attr-path.cc Merge remote-tracking branch 'origin/master' into source-path 2023-04-24 13:20:36 +02: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 Make the Derived Path family of types inductive for dynamic derivations 2023-08-10 00:08:32 -04:00
eval-cache.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
eval-inline.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
eval-settings.cc Factor out nix-defexpr path computation 2023-08-02 12:54:48 -04:00
eval-settings.hh Factor out nix-defexpr path computation 2023-08-02 12:54:48 -04:00
eval.cc Rework evaluator SingleDerivedPath infra 2023-08-14 08:44:50 -04:00
eval.hh Rework evaluator SingleDerivedPath infra 2023-08-14 08:44:50 -04:00
fetchurl.nix fetchurl.nix: change other use of __impure 2022-09-16 01:54:24 -07:00
function-trace.cc
function-trace.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
get-drvs.cc Use std::set<StringContextElem> not PathSet for string contexts 2023-04-21 01:05:49 -04: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
json-to-value.cc return string_views from forceString* 2022-01-27 17:15:43 +01:00
json-to-value.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
lexer.l libexpr: use thread_local to make the parser thread-safe 2023-07-03 16:05:43 +08:00
local.mk Enable -Werror=switch-enum 2023-04-03 18:45:20 +02:00
nix-expr.pc.in Fix building with GCC 9 2023-02-10 18:38:57 +01:00
nixexpr.cc Merge remote-tracking branch 'upstream/master' into source-path 2023-04-17 11:41:50 +02:00
nixexpr.hh Merge remote-tracking branch 'upstream/master' into source-path 2023-04-17 11:41:50 +02:00
parser.y Move evaluator settings (type and global) to separate file/header 2023-07-31 10:14:15 -04:00
paths.cc Backport SourcePath from the lazy-trees branch 2023-04-06 13:15:50 +02:00
primops.cc Rework evaluator SingleDerivedPath infra 2023-08-14 08:44:50 -04:00
primops.hh Automatically document builtin constants 2023-06-27 09:37:54 -04:00
print.cc libexpr: quote reserved keys when printing 2023-05-09 09:45:12 -05:00
print.hh libexpr: quote reserved keys when printing 2023-05-09 09:45:12 -05:00
search-path.cc Clean up SearchPath 2023-07-09 23:22:22 -04: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 toJSON: Add attribute path to trace 2023-07-31 13:02:54 +02: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 Merge remote-tracking branch 'origin/master' into source-path 2023-04-24 13:20:36 +02:00
value-to-xml.hh Use std::set<StringContextElem> not PathSet for string contexts 2023-04-21 01:05:49 -04:00
value.hh Merge pull request #8566 from inclyc/nixd/value-print-depth 2023-07-01 20:08:52 +02:00