nix-super/src/libexpr
John Ericson 7ad66cb3ef Allow dynamic derivation deps in inputDrvs
We use the same nested map representation we used for goals, again in
order to save space. We might someday want to combine with `inputDrvs`,
by doing `V = bool` instead of `V = std::set<OutputName>`, but we are
not doing that yet for sake of a smaller diff.

The ATerm format for Derivations also needs to be extended, in addition
to the in-memory format. To accomodate this, we added a new basic
versioning scheme, so old versions of Nix will get nice errors. (And
going forward, if the ATerm format changes again the errors will be even
better.)

`parsedStrings`, an internal function used as part of parsing
derivations in A-Term format, used to consume the final `]` but expect
the initial `[` to already be consumed. This made for what looked like
unbalanced brackets at callsites, which was confusing. Now it consumes
both which is hopefully less confusing.

As part of testing, we also created a unit test for the A-Term format for
regular non-experimental derivations too.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>

Apply suggestions from code review

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-09-07 10:39:37 -04:00
..
flake Merge pull request #8819 from VertexA115/fix/deep-follow-paths 2023-08-25 10:33:05 -04:00
primops Fixing #7479 2023-08-18 11:44:00 -04:00
tests Merge pull request #8839 from obsidiansystems/string-context-7479 2023-08-18 13:47:01 -04:00
value Fixing #7479 2023-08-18 11:44:00 -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 Fixing #7479 2023-08-18 11:44:00 -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 Delete EvalState::addToSearchPath 2023-08-18 14:04:33 -04:00
eval.hh Delete EvalState::addToSearchPath 2023-08-18 14:04:33 -04: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
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 Move some corepkgs into the nix binary 2020-03-11 16:57:48 +01:00
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 Delete EvalState::addToSearchPath 2023-08-18 14:04:33 -04:00
paths.cc Backport SourcePath from the lazy-trees branch 2023-04-06 13:15:50 +02:00
primops.cc Allow dynamic derivation deps in inputDrvs 2023-09-07 10:39:37 -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 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 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