Age | Commit message (Collapse) | Author |
|
Fixes #5952.
|
|
In particular we were still compiling rust-ffi.cc even though we're
not using it.
|
|
Follow-up from #5969
Fix #5982
|
|
Stop-gap measure to fix #5975.
|
|
Fixes
$ nix-instantiate --parse -E 'x: with x; _'
(x: (with x; __curPos))
|
|
|
|
|
|
Make `nix search` highlight all regexes and matches
|
|
allocate a GC root value for the Value cache pointer
|
|
nix-shell: use clean rm, not any aliases/functions
|
|
Fix segfault or stack overflow caused by large derivation fields
|
|
|
|
|
|
keeping it as a simple data member means it won't be scanned by the GC, so
eventually the GC will collect a cache that is still referenced (resulting in
use-after-free of cache elements).
fixes #5962
|
|
|
|
The signature was also changed so the function now accepts a vector
instead of an iterator
|
|
If we want to be careful about hitting the stack protector page, we should use `-fstack-check` instead.
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
|
|
This no longer worked correctly because 'path' is uninitialised when
an exception occurs, leading to errors like
… while importing ''
at /nix/store/rrzz5b1pshvzh1437ac9nkl06br81lkv-source/flake.nix:352:13:
So move the adding of the error context into realisePath().
|
|
Add back `copyClosure` for plain `StorePath`s
|
|
Fix the build with nlohmann/json 3.10.4+
|
|
Make `nix why-depends` quieter by default
|
|
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
|
|
This was removed in 2e199673a523fa81de31ffdd2a25976ce0814631 when
`copyPath` transitioned to use `RealisedPath`. But then in
e9848beca704d27a13e28b4403251725bd485bb2 we added it back just for
`realisedPath`.
I think it is a good utility function --- one can easily imagine it
becoming optimized in the future, and copying paths *violating* the
closure is a very niche feature.
So if we have `copyPaths` for both sorts of paths, I think we should
have `copyClosure` for both sorts too.
|
|
|
|
This has been unused since 170e86dff5724264e0d3d25b9af1bd42df6aec74
CC @thufschmitt
|
|
|
|
|
|
Although this will leave gaps in the stack, the performance impact
of those should be insignificant and we get a simpler solution
this way.
|
|
|
|
|
|
... to avoid non-standard, unidiomatic alloca.
|
|
This removes a dynamic stack allocation, making the derivation
unparsing logic robust against overflows when large strings are
added to a derivation.
Overflow behavior depends on the platform and stack configuration.
For instance, x86_64-linux/glibc behaves as (somewhat) expected:
$ (ulimit -s 20000; nix-instantiate tests/lang/eval-okay-big-derivation-attr.nix)
error: stack overflow (possible infinite recursion)
$ (ulimit -s 40000; nix-instantiate tests/lang/eval-okay-big-derivation-attr.nix)
error: expression does not evaluate to a derivation (or a set or list of those)
However, on aarch64-darwin:
$ nix-instantiate big-attr.nix ~
zsh: segmentation fault nix-instantiate big-attr.nix
This indicates a slight flaw in the single stack protection page
approach that is not encountered with normal stack frames.
|
|
|
|
Unless `--precise` is passed, make `nix why-depends` only show the
dependencies between the store paths, without introspecting them to
find the actual references.
This also makes it ~3x faster
|
|
This allows setting the commit-lockfile-summary option to a non-empty
string to override the commit summary while leaving the body unchanged.
|
|
optimize primops and utils by caching more and copying less
|
|
Print build logs when not connected to a TTY
|
|
|
|
This is needed to get the path of a derivation that might not exist
(e.g. for 'nix store copy-log').
InstallableStorePath::toDerivedPaths() cannot be used for this because
it calls readDerivation(), so it fails if the store doesn't have the
derivation.
|
|
|
|
Fixes #5222.
|
|
|
|
|
|
|
|
Remove shared strings
|
|
These were needed back in the pre-C++11 era because we didn't have
move semantics. But now we do.
|
|
flakes: search up to git or filesystem boundary
|
|
|
|
|
|
|