mirror of
https://github.com/NixOS/nix
synced 2025-06-29 02:11:15 +02:00
Introduce MemoryInputAccessor and use it for corepkgs
MemoryInputAccessor is an in-memory virtual filesystem that returns files like <nix/fetchurl.nix>. This removes the need for special hacks to handle those files.
This commit is contained in:
parent
ea38605d11
commit
df73c6eb8c
11 changed files with 176 additions and 98 deletions
|
@ -295,7 +295,7 @@ namespace nix {
|
|||
TEST_F(ErrorTraceTest, toPath) {
|
||||
ASSERT_TRACE2("toPath []",
|
||||
TypeError,
|
||||
hintfmt("cannot coerce %s to a string", "a list"),
|
||||
hintfmt("cannot coerce %s to a path", "a list"),
|
||||
hintfmt("while evaluating the first argument passed to builtins.toPath"));
|
||||
|
||||
ASSERT_TRACE2("toPath \"foo\"",
|
||||
|
@ -309,8 +309,8 @@ namespace nix {
|
|||
TEST_F(ErrorTraceTest, storePath) {
|
||||
ASSERT_TRACE2("storePath true",
|
||||
TypeError,
|
||||
hintfmt("cannot coerce %s to a string", "a Boolean"),
|
||||
hintfmt("while evaluating the first argument passed to builtins.storePath"));
|
||||
hintfmt("cannot coerce %s to a path", "a Boolean"),
|
||||
hintfmt("while evaluating the first argument passed to 'builtins.storePath'"));
|
||||
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,7 @@ namespace nix {
|
|||
TEST_F(ErrorTraceTest, pathExists) {
|
||||
ASSERT_TRACE2("pathExists []",
|
||||
TypeError,
|
||||
hintfmt("cannot coerce %s to a string", "a list"),
|
||||
hintfmt("cannot coerce %s to a path", "a list"),
|
||||
hintfmt("while realising the context of a path"));
|
||||
|
||||
ASSERT_TRACE2("pathExists \"zorglub\"",
|
||||
|
@ -377,13 +377,13 @@ namespace nix {
|
|||
TEST_F(ErrorTraceTest, filterSource) {
|
||||
ASSERT_TRACE2("filterSource [] []",
|
||||
TypeError,
|
||||
hintfmt("cannot coerce %s to a string", "a list"),
|
||||
hintfmt("while evaluating the second argument (the path to filter) passed to builtins.filterSource"));
|
||||
hintfmt("cannot coerce %s to a path", "a list"),
|
||||
hintfmt("while evaluating the second argument (the path to filter) passed to 'builtins.filterSource'"));
|
||||
|
||||
ASSERT_TRACE2("filterSource [] \"foo\"",
|
||||
EvalError,
|
||||
hintfmt("string '%s' doesn't represent an absolute path", "foo"),
|
||||
hintfmt("while evaluating the second argument (the path to filter) passed to builtins.filterSource"));
|
||||
hintfmt("while evaluating the second argument (the path to filter) passed to 'builtins.filterSource'"));
|
||||
|
||||
ASSERT_TRACE2("filterSource [] ./.",
|
||||
TypeError,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue