Age | Commit message (Collapse) | Author |
|
|
|
Test nested sandboxing, and make nicer error
|
|
We were bedeviled by sandboxing issues when working on the layered
store. The problem ended up being that when we have nested nix builds,
and the inner store is inside the build dir (e.g. store is
`/build/nix-test/$name/store`, build dir is `/build`) bind mounts
clobber each other and store paths cannot be found.
After thoroughly cleaning up `local-derivation-goal.cc`, we might be
able to make that work. But that is a lot of work. For now, we just fail
earlier with a proper error message.
Finally, test this: nested sandboxing without the problematic store dir
should work, and with should fail with the expected error message.
Co-authored-by: Dylan Green <67574902+cidkidnix@users.noreply.github.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
Move `BuiltPath` to its own header/C++ file in libcmd
|
|
Fix race condition in the language tests
|
|
When we pipe to `>(...)` like that, we unfortunately don't wait for the
process to finish. Better to just substitute the file.
Also, use the "unified" diff output that people (including myself) are
more familiar with, thanks to Git.
|
|
It is less important, and used less widely, than `DerivedPath`.
|
|
Language test improvements
|
|
* Lang now verifies errors and parse output
* Some new miscellaneous tests
* Easy way to update the tests
* Document workflow in manual
* Use `!` not `~` as separater char for sed
It is confusing to use `~` when we are talking about paths and home
directories!
* Test test suite itself (`test/lang-test/infra.sh`)
Additionally, run shellcheck on `tests/lang.sh` to help ensure it is
correct, now that is is more complex.
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
|
|
It's UTF-8, not UFT-8.
|
|
Further search path cleanups
|
|
libexpr: remove std::move() for `basePath` in parser, it has no effect
|
|
nix-daemon.service: Add TasksMax=1048576
|
|
|
|
|
|
`fetchClosure`: input addressed and pure
|
|
- Better types
- Own header / C++ file pair
- Test factored out methods
- Pass parsed thing around more than strings
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
We should use `std::optional<std::string>` not `std::pair<bool,
std::string>` for an optional string.
|
|
labeler.yml: tests -> with-tests
|
|
|
|
|
|
|
|
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
|
|
|
|
Profile list improvements
|
|
* Document the path flakeref format
Fix https://github.com/NixOS/nix/issues/8482
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
|
|
libexpr: use `thread_local` to make the parser thread-safe
|
|
|
|
This just dumps the profile manifest to stdout.
|
|
'resolvedRef' was incorrect, since a resolved ref is one after
registry resolution, which may still be unlocked (e.g. 'nixpkgs' ->
'github:NixOS/nixpkgs').
|
|
If we call `adjustLoc`, the global variable `prev_yylloc` is shared
between threads and racy.
Currently, nix itself does not concurrently parsing files, but this is
helpful for libexpr users. (The parser is thread-safe except this.)
|
|
|
|
libexpr: extend `Value::print` to allow limited depth
|
|
tests: Don't install test-libstoreconsumer program
|
|
Sorry about that.
Fixes https://github.com/NixOS/nix/issues/8616
|
|
We should check error messages, so that we know the command fails for
the right reason.
Alternatively, a mere typo can run the test undetected.
|
|
|
|
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
|
|
|
|
|
|
A single variable is nice and self-contained.
|
|
|
|
|
|
|
|
|
|
When explicitly requested by the caller, as suggested in the meeting
(https://github.com/NixOS/nix/pull/8090#issuecomment-1531139324)
> @edolstra: { toPath } vs { fromPath } is too implicit
I've opted for the `inputAddressed = true` requirement, because it
we did not agree on renaming the path attributes.
> @roberth: more explicit
> @edolstra: except for the direction; not immediately clear in which direction the rewriting happens
This is in fact the most explicit syntax and a bit redundant, which is
good, because that redundancy lets us deliver an error message that
reminds expression authors that CA provides a better experience to
their users.
|
|
|
|
|
|
linkOrCopy: Fallback upon cross-device link error (EXDEV)
|
|
Fix building derivations in local chroot store on OpenAFS,
where hard linking accross directories causes cross-device link error
(EXDEV).
|