Age | Commit message (Collapse) | Author |
|
https://hydra.nixos.org/build/202837872
|
|
Introduce AbstractPos
|
|
Add CanonPath wrapper to represent canonicalized paths
|
|
This makes the position object used in exceptions abstract, with a
method getSource() to get the source code of the file in which the
error originated. This is needed for lazy trees because source files
don't necessarily exist in the filesystem, and we don't want to make
libutil depend on the InputAccessor type in libfetcher.
|
|
|
|
|
|
Save developers from scrolling by displaying the error message last,
below the stack trace.
|
|
When debugging nix expressions the outermost trace tends to be more useful
than the innermost. It is therefore printed last to save developers from
scrolling.
|
|
|
|
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
|
|
|
|
Given this typo I am not sure if it has been tested.
|
|
Fixes #7268.
|
|
Also, don't assume in LocalDerivationGoal that cgroups are mounted on
/sys/fs/cgroup.
|
|
|
|
Automatic UID allocation
|
|
|
|
The new experimental feature 'cgroups' enables the use of cgroups for
all builds. This allows better containment and enables setting
resource limits and getting some build stats.
|
|
|
|
|
|
|
|
|
|
|
|
We don't need SGID, or any ACL's. We also want to keep every dir +rx.
|
|
|
|
- call close explicitly in writeFile to prevent the close exception
from being ignored
- fsync after writing schema file to flush data to disk
- fsync schema file parent to flush metadata to disk
https://github.com/NixOS/nix/issues/7064
|
|
This removes unintended blank lines in Markdown when the description
is a multiline string literal.
|
|
This was caused by -L calling setLogFormat() again, which caused the
creation of a new progress bar without destroying the old one. So we
had two progress bars clobbering each other.
We should change 'logger' to be a smart pointer, but I'll do that in a
future PR.
Fixes #6931.
|
|
Avoids leaving dangling attributes like
{
"foo":
}
in case of exceptions.
|
|
This message was unhelpful (#1184) and probably misleading since
memory is O(1) in most cases now.
|
|
fix-mv-in-different-filesystems
|
|
Doesn't seem needed on a recent-enough clang anymore (and even seems to
break stuff)
|
|
|
|
Also, make the JSON writer support std::string_view.
Fixes #6857.
|
|
Rather than directly copying the source to its dest, copy it first to a
temporary location, and eventually move that temporary.
That way, the move is at least atomic from the point-of-view of the destination
|
|
In most places the fallback to copying isn’t needed and can actually be
bad, so we’d rather not transparently fallback
|
|
`move` tends to have this `mv` connotation of “I will copy it for you if
needs be”
|
|
Required by the old clang version
|
|
The recursive copy from the stl doesn’t exactly do what we need because
1. It doesn’t delete things as we go
2. It doesn’t keep the mtime, which change the nars
So re-implement it ourselves. A bit dull, but that way we have what we want
|
|
In `nix::rename`, if the call to `rename` fails with `EXDEV` (failure
because the source and the destination are in a different filesystems)
switch to copying and removing the source.
To avoid having to re-implement the copy manually, I switched the
function to use the c++17 `filesystem` library (which has a `copy`
function that should do what we want).
Fix #6262
|
|
Directly takes some c++ strings, and gently throws an exception on error
(rather than having to inline this logic everywhere)
|
|
Unclutter `util.cc` a bit
|
|
local-derivation-goal.cc: improve error messages when sandboxing fails
|
|
|
|
|
|
Improve shell completion of flake inputs
|
|
Defers completion of flake inputs until the whole command line is parsed
so that we know what flakes we need to complete the inputs of.
Previously, `nix build flake --update-input <Tab>` always behaved like
`nix build . --update-input <Tab>`.
|
|
Nix repl flakes
|
|
|
|
'build-remote' is now executed via /proc/self/exe so it always works.
|