John Ericson
c466cb2091
Merge branch 'hash-always-has-type' into better-ca-parse-errors
2020-07-13 03:02:09 +00:00
John Ericson
4415765385
Merge remote-tracking branch 'upstream/master' into hash-always-has-type
2020-07-13 03:01:44 +00:00
Eelco Dolstra
8efa23bb99
Avoid a redundant hash
2020-07-10 15:56:24 +02:00
Eelco Dolstra
5dff49f661
Factor out commonality between nix-prefetch-url and nix-store --add-fixed
2020-07-10 13:21:37 +02:00
Eelco Dolstra
7f1a86d57c
nix-store --add-fixed: Run in constant memory
2020-07-10 12:51:56 +02:00
Eelco Dolstra
06e3dd9005
nix-prefetch-url: Run in constant memory when using RemoteStore
...
Fixes #3684 .
2020-07-10 11:22:48 +02:00
John Ericson
323d51a7a0
Merge branch 'master' of github.com:NixOS/nix into better-ca-parse-errors
2020-07-09 19:07:06 +00:00
Eelco Dolstra
a2c27022e9
LocalStore::addToStore(srcPath): Handle the flat case
...
This helps nix-prefetch-url when using a local store.
2020-07-09 15:54:32 +02:00
Eelco Dolstra
b981e5aacf
Cleanup
2020-07-08 22:07:21 +02:00
Eelco Dolstra
34f25124ba
Make LocalStore::addToStore(srcPath) run in constant memory
...
This reduces memory consumption of
nix-instantiate \
-E 'with import <nixpkgs> {}; runCommand "foo" { src = ./blender; } "echo foo"' \
--option nar-buffer-size 10000
(where ./blender is a 1.1 GiB tree) from 1716 to 36 MiB, while still
ensuring that we don't do any write I/O for small source paths (up to
'nar-buffer-size' bytes). The downside is that large paths are now
always written to a temporary location in the store, even if they
produce an already valid store path. Thus, adding large paths might be
slower and run out of disk space. ¯\_(ツ)_/¯ Of course, you can always
restore the old behaviour by setting 'nar-buffer-size' to a very high
value.
2020-07-08 22:07:21 +02:00
Eelco Dolstra
16ec7785ca
Fix 'got unknown message type 1 from Nix daemon'
...
Example:
$ nix-build -E 'with import <nixpkgs> {}; runCommand "foo" { x = runCommand "bar" {} "exit 1"; } "echo foo; exit 1"'
warning: unknown setting 'auto-allocate-uids'
these 2 derivations will be built:
/nix/store/v4fbdbhcdi949929a67g8farwf72zgam-bar.drv
/nix/store/k4fsvrjl7cp2xpz7927iv7g0dqj1zyhs-foo.drv
warning: unknown setting 'auto-allocate-uids'
building '/nix/store/v4fbdbhcdi949929a67g8farwf72zgam-bar.drv'...
error: --- Error ----------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-daemon
builder for '/nix/store/v4fbdbhcdi949929a67g8farwf72zgam-bar.drv' failed with exit code 1
error: --- Error ------------------------------------------------------------------------------------------------------------------------------------------------------------------ nix-build
got unknown message type 1 from Nix daemon
2020-07-08 15:53:14 +02:00
Eelco Dolstra
4055cfee36
Fix coverage build
2020-07-07 14:37:47 +02:00
Eelco Dolstra
7c9ece5dca
exportReferencesGraph: Fix support for non-top-level store paths
...
Fixes #3471 .
2020-07-07 14:25:43 +02:00
Carlo Nucera
0f05a36e20
Merge branch 'master' of github.com:NixOS/nix into better-ca-parse-errors
2020-07-06 16:57:09 -04:00
Ben Burdette
efd6a8b230
bump
2020-07-06 11:54:53 -06:00
Ben Burdette
75bfcf8d15
revamp trace code and test
2020-07-06 10:51:48 -06:00
Ben Burdette
a168224464
spacing
2020-07-04 18:30:49 -06:00
John Ericson
3134db1a83
Merge branch 'hash-always-has-type' of github.com:obsidiansystems/nix into better-ca-parse-errors
2020-07-03 14:12:38 +00:00
John Ericson
dbffd309fe
Merge branch 'master' of github.com:NixOS/nix into hash-always-has-type
2020-07-03 14:11:38 +00:00
Ben Burdette
b29a4ea1dc
Merge branch 'master' into add-trace
2020-07-03 07:57:36 -06:00
Eelco Dolstra
c3c7aedbb5
nix develop: Fix bad regex
...
This was accepted by libstdc++ but not libc++.
https://hydra.nixos.org/build/123569154
2020-07-03 14:58:58 +02:00
Eelco Dolstra
6f8fd3a3f2
Shut up a clang warning
2020-07-03 14:50:07 +02:00
regnat
223fbe644a
Shorten the path to the test root
...
Fix a socket length failure on the OSX builders
2020-07-03 09:20:01 +02:00
John Ericson
13796be78d
Have splitPrefix
and splitPrefixTo
parser helpers
2020-07-02 23:18:22 +00:00
John Ericson
a7cd7425d9
Move getParsedTypeAndSRI
to a more suitable location
...
Also mark it static
2020-07-02 23:10:11 +00:00
John Ericson
2f93d9f2ba
Merge branch 'hash-always-has-type' into HEAD
2020-07-02 21:47:51 +00:00
John Ericson
1be279af26
Fix Narinfo corruption detection bug
...
The aim of this check was just to ensure each key occurs once.
2020-07-02 21:46:10 +00:00
Eelco Dolstra
b5e4253697
Fix abort in 'nix develop'
2020-07-02 18:24:11 +02:00
Carlo Nucera
1fc835aa22
Tighten parsing for drv files and pathinfo
2020-07-02 11:57:21 -04:00
Ben Burdette
5818271c6e
spacing
2020-07-02 09:41:54 -06:00
Carlo Nucera
b6b10b1d4c
Write the implementation for parseNonSRIUnprefixed
2020-07-02 11:34:40 -04:00
Carlo Nucera
ea48e3a5b5
Abstract common parsing functionality
2020-07-02 11:29:33 -04:00
Carlo Nucera
36cbc74689
Inline and simplify in parseAnyPrefixed
2020-07-02 11:21:00 -04:00
Carlo Nucera
9462d8a50b
Rename fromSRI to parseSRI for constistency
2020-07-02 11:11:18 -04:00
Carlo Nucera
f61bc45d19
Get rid of the std::pair
2020-07-02 11:09:04 -04:00
Ben Burdette
bf2788e4c1
move showTrace to new loggerSettings
2020-07-02 09:04:31 -06:00
Carlo Nucera
27c8029573
Inline newFunction
2020-07-02 11:01:10 -04:00
Carlo Nucera
343d1569b1
Fix test suite
2020-07-02 10:48:47 -04:00
Ben Burdette
5ae498872a
assert for invalid fileorigin
2020-07-02 07:14:40 -06:00
Carlo Nucera
263ccdd489
Rename two hash constructors to proper functions
2020-07-01 18:34:18 -04:00
Carlo Nucera
c8c4bcf90e
Inline Hash::init()
2020-07-01 18:03:35 -04:00
Carlo Nucera
d63a5ded76
Remove unused import
2020-07-01 17:53:24 -04:00
Carlo Nucera
6faeec3b2a
Keep the previous name, for diffing
2020-07-01 17:50:34 -04:00
Carlo Nucera
274a8136fb
Correct FIXMEs in libfetchers
2020-07-01 17:47:15 -04:00
Carlo Nucera
c2e7f7a712
Fixed build, we still have test errors
2020-07-01 17:32:06 -04:00
Ben Burdette
8497891b99
spacing
2020-07-01 13:50:18 -06:00
Ben Burdette
a295b2ea96
if no errLoc, no Loc.
2020-07-01 12:02:02 -06:00
Ben Burdette
3629b0585a
don't include errpos for addErrorContext
2020-07-01 11:49:01 -06:00
Ben Burdette
2a39c083dc
non-pos trace test
2020-07-01 10:37:31 -06:00
Eelco Dolstra
38ccf2e241
Cleanup
2020-07-01 15:31:34 +02:00