about summary refs log tree commit diff
path: root/src/libutil/json.hh (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2016-10-06 Fix getS3Stats()Eelco Dolstra2-2/+2
2016-10-05 Use std::random_deviceEelco Dolstra1-0/+1
2016-10-04 Fix build with older versions of libcurlEelco Dolstra1-0/+6
2016-09-22 Handle the case where signed-binary-caches consists of whitespaceEelco Dolstra1-1/+1
2016-09-22 <nix/fetchurl.nix>: Support nix-prefetch-urlEelco Dolstra1-0/+3
2016-09-21 Add sandbox-dev-shm-size optionEelco Dolstra2-1/+15
Fixes #1069.
2016-09-21 nix-build, nix-shell: Don't print error message if nix-store/nix-instantiate ↵Eelco Dolstra3-6/+39
fails
2016-09-21 printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra30-140/+140
2016-09-21 Some notational convenience for formatting stringsEelco Dolstra6-22/+81
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);
2016-09-21 Document the { __toString } interfacezimbatm1-2/+2
2016-09-20 TweakEelco Dolstra3-8/+5
2016-09-20 Improve robustnessEelco Dolstra1-2/+6
2016-09-20 Fix "Promise already satisfied" errorEelco Dolstra1-1/+3
2016-09-20 Add a new option to disable documentation generation at configure timeAdrien Devresse3-0/+17
2016-09-20 nix-shell: Fix $PATH handling in the impure caseEelco Dolstra3-29/+55
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.
2016-09-20 nix-shell: Restore CPU affinityEelco Dolstra1-6/+10
Otherwise the shell and its children will be bound to one CPU core...
2016-09-16 armv5tel can be built by armv6l and armv7l (#1063)Eric Litak1-0/+1
2016-09-16 Make computeFSClosure() single-threaded againEelco Dolstra16-202/+385
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.)
2016-09-16 printMsg(): Don't check for interruptsEelco Dolstra3-17/+15
Having the logger function potentially throw exceptions is Heisenbuggy.
2016-09-14 nix path-info: Add some more examplesEelco Dolstra1-1/+9
2016-09-14 Revive binary-caches-parallel-connectionsEelco Dolstra2-6/+11
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).
2016-09-14 Enable HTTP/2 supportEelco Dolstra9-207/+430
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.
2016-09-14 Add a toLower utility functionEelco Dolstra2-0/+14
2016-09-14 Move some .drv parsing functions out of utilEelco Dolstra3-55/+46
2016-09-12 nix-daemon: Fix error messageShea Levy1-1/+1
2016-09-12 ssh-store: Start master on-demandShea Levy1-8/+13
2016-09-12 Inline ssh-store.hh into ssh-store.ccShea Levy2-41/+34
2016-09-12 Fix gc-runtime testEelco Dolstra1-1/+1
It was failing on some platforms. http://hydra.nixos.org/build/39538866
2016-09-12 Fix build on GCC 4.9Eelco Dolstra1-11/+8
GCC 4.9 doesn't like reassigning a std::stringstream. http://hydra.nixos.org/build/40371644
2016-09-12 Write "T x" instead of "auto x = T"Eelco Dolstra1-35/+32
That's just silly. Hopefully this also fixes the Debian build failure: http://hydra.nixos.org/build/40371644
2016-09-08 Fix test failureEelco Dolstra1-3/+3
2016-09-08 Don't run builds as root in the user namespaceEelco Dolstra1-16/+31
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").
2016-09-08 Give a better error message if a path in build-sandbox-paths is invalidEelco Dolstra1-2/+6
2016-09-08 Fix assertion failure after early build setup failureEelco Dolstra1-1/+1
2016-09-08 Fix early removal of rc-file for nix-shellShea Levy1-2/+0
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.
2016-09-07 upload-release.pl: Update NixpkgsEelco Dolstra1-0/+31
2016-09-02 Implement nar-based addToStore for remote-storeShea Levy3-2/+31
2016-09-02 Add ssh store implementationShea Levy3-4/+136
2016-09-02 Add narFromPath op to nix daemonShea Levy2-0/+9
2016-09-02 Factor a general remote FS accessor out of BinaryCacheStoreShea Levy3-64/+88
2016-09-02 Factor out the unix domain socket-specific code from RemoteStoreShea Levy5-36/+69
2016-09-02 nix-daemon: add --stdio flag for handling connections over stdin/stdoutShea Levy1-1/+75
2016-09-02 Factor a function to get the store type from a URI out of the main ↵Shea Levy2-18/+35
RegisterStoreImplementation
2016-09-02 Merge openStore and openStoreAt with default argumentsShea Levy6-18/+8
2016-08-31 nix-build: Clean up a bitShea Levy1-6/+8
2016-08-31 download.hh: Fix conflicts from nix-channel-c++ mergeShea Levy3-16/+7
2016-08-31 nix-daemon.service: Set $XDG_CACHE_HOMEEelco Dolstra1-0/+1
Nix requires either $HOME or $XDG_CACHE_HOME to be set.
2016-08-30 Fix 32-bit buildEelco Dolstra3-5/+8
2016-08-30 Increase the sleep time between download retriesEelco Dolstra3-2/+4
2016-08-30 Fix --fallbackEelco Dolstra1-7/+10
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.