nix-super/src/libutil
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
..
tests Merge pull request #4282 from tweag/fix-ca-hash-rewriting 2023-06-14 18:25:00 +02:00
abstract-setting-to-json.hh Split OptionalPathSetting from PathSetting 2023-06-18 23:31:18 -04:00
ansicolor.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
archive.cc Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
archive.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
args.cc MultiCommand::toJSON: Fix use-after-move 2023-08-11 12:00:11 +02:00
args.hh Stuctured command stability 2023-04-03 11:48:21 -04:00
callback.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
canon-path.cc Backport SourcePath from the lazy-trees branch 2023-04-06 13:15:50 +02:00
canon-path.hh Merge remote-tracking branch 'upstream/master' into source-path 2023-04-17 11:41:50 +02:00
cgroup.cc Clean up cgroup handling in getMaxCPU() 2022-12-02 12:59:13 +01:00
cgroup.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
chunked-vector.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
closure.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
comparator.hh Allow dynamic derivation deps in inputDrvs 2023-09-07 10:39:37 -04:00
compression.cc Rename and protect BufferedSink::write 2023-04-07 09:21:50 +02:00
compression.hh Rename and protect BufferedSink::write 2023-04-07 09:21:50 +02:00
compute-levels.cc Add x86_64 compute levels as additional system types 2021-02-22 09:11:15 +01:00
compute-levels.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
config-impl.hh Merge pull request #8374 from obsidiansystems/improve-path-setting 2023-06-21 15:40:43 -04:00
config.cc Split OptionalPathSetting from PathSetting 2023-06-18 23:31:18 -04:00
config.hh Split OptionalPathSetting from PathSetting 2023-06-18 23:31:18 -04:00
error.cc initLibUtil: Add exception handling self-check 2023-08-11 17:25:42 +02:00
error.hh initLibUtil: Add exception handling self-check 2023-08-11 17:25:42 +02:00
experimental-features.cc Stabilize discard-references 2023-08-07 16:53:37 +02:00
experimental-features.hh Stabilize discard-references 2023-08-07 16:53:37 +02:00
filesystem.cc Remove dead code (#8504) 2023-06-14 14:09:11 -04:00
finally.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
fmt.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
git.cc Fix the parsing of the sourcehut refs file 2022-05-04 14:38:59 +02:00
git.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
hash.cc Merge pull request #7732 from hercules-ci/make-initLibStore-viable-alternative 2023-04-17 08:04:41 -04:00
hash.hh Rename and protect BufferedSink::write 2023-04-07 09:21:50 +02:00
hilite.cc Fix incorrect comment in hiliteMatches 2022-06-05 20:30:18 +02:00
hilite.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
json-impls.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
json-utils.cc Fix derivation load assertion errors 2023-08-05 01:34:30 +02:00
json-utils.hh Fix derivation load assertion errors 2023-08-05 01:34:30 +02:00
local.mk Remove the explicit c++fs linkage on darwin 2022-08-08 14:34:22 +02:00
logging.cc SimpleLogger::log: fix unintended fallthrough 2023-08-11 12:05:45 +02:00
logging.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
lru-cache.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
monitor-fd.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
namespaces.cc Simplify the PID namespace check: just try to mount /proc 2023-02-10 14:38:14 +01:00
namespaces.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
pool.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
ref.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
references.cc Don't assume the type of string::size_type 2023-06-15 21:24:14 +02:00
references.hh Don't assume the type of string::size_type 2023-06-15 21:24:14 +02:00
regex-combinators.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
serialise.cc Merge pull request #8176 from tweag/rename-confusing-write-method 2023-04-14 10:44:36 +02:00
serialise.hh Merge pull request #8176 from tweag/rename-confusing-write-method 2023-04-14 10:44:36 +02:00
split.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
suggestions.cc Implement operator<< for Suggestions 2022-03-07 10:09:10 +01:00
suggestions.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
sync.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
tarfile.cc TarArchive: Remove a duplicate constant and increase the buffer size 2023-04-25 16:43:10 +02:00
tarfile.hh TarArchive: Remove a duplicate constant and increase the buffer size 2023-04-25 16:43:10 +02:00
thread-pool.cc Remove CPU locking 2021-12-22 15:56:25 +01:00
thread-pool.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
topo-sort.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
types.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
url-parts.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
url.cc libutil: fix double-encoding of URLs 2023-08-17 14:16:19 -07:00
url.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
util.cc Fix warning 'catching polymorphic type by value' 2023-09-01 14:49:49 +02:00
util.hh Remove dead code (#8504) 2023-06-14 14:09:11 -04:00
variant-wrapper.hh Fixing #7479 2023-08-18 11:44:00 -04:00
xml-writer.cc xml-writer: Remove std aliases 2022-02-25 16:13:02 +01:00
xml-writer.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00