Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Fixes #1069.
|
|
fails
|
|
|
|
We can now write
throw Error("file '%s' not found", path);
instead of
throw Error(format("file '%s' not found") % path);
and similarly
printError("file '%s' not found", path);
instead of
printMsg(lvlError, format("file '%s' not found") % path);
|
|
Document the { __toString } interface
|
|
|
|
Add a new option to disable documentation generation at configure time
|
|
|
|
|
|
|
|
|
|
We were passing "p=$PATH" rather than "p=$PATH;", resulting in some
invalid shell code.
Also, construct a separate environment for the child rather than
overwriting the parent's.
|
|
Otherwise the shell and its children will be bound to one CPU core...
|
|
|
|
The fact that queryPathInfo() is synchronous meant that we needed a
thread for every concurrent binary cache lookup, even though they end
up being handled by the same download thread. Requiring hundreds of
threads is not a good idea. So now there is an asynchronous version of
queryPathInfo() that takes a callback function to process the
result. Similarly, enqueueDownload() now takes a callback rather than
returning a future.
Thus, a command like
nix path-info --store https://cache.nixos.org/ -r /nix/store/slljrzwmpygy1daay14kjszsr9xix063-nixos-16.09beta231.dccf8c5
that returns 4941 paths now takes 1.87s using only 2 threads (the main
thread and the downloader thread). (This is with a prewarmed
CloudFront.)
|
|
Having the logger function potentially throw exceptions is
Heisenbuggy.
|
|
|
|
It's a slight misnomer now because it actually limits *all* downloads,
not just binary cache lookups.
Also add a "enable-http2" option to allow disabling use of HTTP/2
(enabled by default).
|
|
The binary cache store can now use HTTP/2 to do lookups. This is much
more efficient than HTTP/1.1 due to multiplexing: we can issue many
requests in parallel over a single TCP connection. Thus it's no longer
necessary to use a bunch of concurrent TCP connections (25 by
default).
For example, downloading 802 .narinfo files from
https://cache.nixos.org/, using a single TCP connection, takes 11.8s
with HTTP/1.1, but only 0.61s with HTTP/2.
This did require a fairly substantial rewrite of the Downloader class
to use the curl multi interface, because otherwise curl wouldn't be
able to do multiplexing for us. As a bonus, we get connection reuse
even with HTTP/1.1. All downloads are now handled by a single worker
thread. Clients call Downloader::enqueueDownload() to tell the worker
thread to start the download, getting a std::future to the result.
|
|
|
|
|
|
It was failing on some platforms.
http://hydra.nixos.org/build/39538866
|
|
GCC 4.9 doesn't like reassigning a std::stringstream.
http://hydra.nixos.org/build/40371644
|
|
That's just silly. Hopefully this also fixes the Debian build failure:
http://hydra.nixos.org/build/40371644
|
|
|
|
This largely reverts c68e5913c71badc89ff346d1c6948517ba720c93. Running
builds as root breaks "cp -p", since when running as root, "cp -p"
assumes that it can succesfully chown() files. But that's not actually
the case since the user namespace doesn't provide a complete uid
mapping. So it barfs with a fatal error message ("cp: failed to
preserve ownership for 'foo': Invalid argument").
|
|
|
|
|
|
BASH_ENV causes all non-interactive shells called via eg. /etc/bashrc to
remove the rc-file before the main shell gets to run it. Completion
scripts will often do this. Fixes #976.
Adapted from and fixes #1034.
|
|
|
|
|
|
|
|
|
|
|
|
Implement resolve-system-dependencies in C++
|
|
Nix requires either $HOME or $XDG_CACHE_HOME to be set.
|
|
|
|
|
|
This fixes an assertion failure in "assert(goal);" in
Worker::waitForInput() after a substitution goal is cancelled by the
termination of another goal. The problem was the line
//worker.childTerminated(shared_from_this()); // FIXME
in the SubstitutionGoal destructor. This was disabled because
shared_from_this() obviously doesn't work from a destructor. So we now
use a real pointer for object identity.
|
|
These don't support regex_replace either.
|
|
|
|
This reverts commit f32c6ed8730628d0cf32f7e124681b1011192a73. It
breaks the RPM builds because Nixpkgs's rpmBuild function only copies
in the .tar.gz file.
|
|
These don't support regex_replace.
http://hydra.nixos.org/build/39363999
http://hydra.nixos.org/build/39363981
|
|
|
|
|
|
|
|
The implementation of "partition" in Nixpkgs is O(n^2) (because of the
use of ++), and for some reason was causing stack overflows in
multi-threaded evaluation (not sure why).
This reduces "nix-env -qa --drv-path" runtime by 0.197s and memory
usage by 298 MiB (in non-Boehm mode).
|