about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-17 Nix 1.6.1 release notesEelco Dolstra1-0/+60
2013-10-17 Fix testEelco Dolstra1-1/+2
2013-10-17 Test string semantics a bit moreEelco Dolstra2-3/+6
2013-10-17 two typosgoblin1-2/+2
2013-10-17 Ensure proper type checking/coercion of "${expr}"Eelco Dolstra1-2/+3
Now we only rewrite "${expr}" to expr if expr is a string literal.
2013-10-17 Add a test for type correctness of antiquotesEelco Dolstra3-0/+3
Antiquotes should evaluate to strings or paths. This is usually checked, except in the case where the antiquote makes up the entire string, as in "${expr}". This is optimised to expr, which discards the runtime type checks / coercions.
2013-10-17 Revert the behaviour of antiquoted paths to pre-Nix 1.6Eelco Dolstra1-4/+4
Commit 159e621d1a9c4391b53f3d822109c36931934698 accidentally changed the behaviour of antiquoted paths, e.g. "${/foo}/bar" used to evaluate to "/nix/store/<hash>-foo/bar" (where /foo gets copied to the store), but in Nix 1.6 it evaluates to "/foo/bar". This is inconsistent, since " ${/foo}/bar" evaluates to " /nix/store/<hash>-foo/bar". So revert to the old behaviour.
2013-10-16 Add a regression test for correct path antiquotation behaviorEelco Dolstra1-0/+4
This broke in Nix 1.6.
2013-10-16 Retry all SQLite operationsEelco Dolstra2-128/+169
To deal with SQLITE_PROTOCOL, we also need to retry read-only operations.
2013-10-16 Fix a race in registerFailedPath()Eelco Dolstra1-2/+1
Registering the path as failed can fail if another process does the same thing after the call to hasPathFailed(). This is extremely unlikely though.
2013-10-16 Convenience macros for retrying a SQLite transactionEelco Dolstra1-46/+42
2013-10-16 Don't wrap read-only queries in a transactionEelco Dolstra1-6/+0
There is no risk of getting an inconsistent result here: if the ID returned by queryValidPathId() is deleted from the database concurrently, subsequent queries involving that ID will simply fail (since IDs are never reused).
2013-10-16 Print a distinct warning for SQLITE_PROTOCOLEelco Dolstra1-4/+8
2013-10-16 Treat SQLITE_PROTOCOL as SQLITE_BUSYEelco Dolstra1-1/+1
In the Hydra build farm we fairly regularly get SQLITE_PROTOCOL errors (e.g., "querying path in database: locking protocol"). The docs for this error code say that it "is returned if some other process is messing with file locks and has violated the file locking protocol that SQLite uses on its rollback journal files." However, the SQLite source code reveals that this error can also occur under high load: if( cnt>5 ){ int nDelay = 1; /* Pause time in microseconds */ if( cnt>100 ){ VVA_ONLY( pWal->lockError = 1; ) return SQLITE_PROTOCOL; } if( cnt>=10 ) nDelay = (cnt-9)*238; /* Max delay 21ms. Total delay 996ms */ sqlite3OsSleep(pWal->pVfs, nDelay); } i.e. if certain locks cannot be not acquired, SQLite will retry a number of times before giving up and returing SQLITE_PROTOCOL. The comments say: Circumstances that cause a RETRY should only last for the briefest instances of time. No I/O or other system calls are done while the locks are held, so the locks should not be held for very long. But if we are unlucky, another process that is holding a lock might get paged out or take a page-fault that is time-consuming to resolve, during the few nanoseconds that it is holding the lock. In that case, it might take longer than normal for the lock to free. ... The total delay time before giving up is less than 1 second. On a heavily loaded machine like lucifer (the main Hydra server), which often has dozens of processes waiting for I/O, it seems to me that a page fault could easily take more than a second to resolve. So, let's treat SQLITE_PROTOCOL as SQLITE_BUSY and retry the transaction. Issue NixOS/hydra#14.
2013-10-14 nix-shell: Fix bash completionEelco Dolstra1-0/+1
Nixpkgs's stdenv setup script sets the "nullglob" option, but doing so breaks Bash completion on NixOS (when ‘programs.bash.enableCompletion’ is set) and on Ubuntu. So clear that flag afterwards. Of course, this may break stdenv functions in subtle ways...
2013-10-11 Adjust to the NixOS/Nixpkgs mergeEelco Dolstra2-2/+2
2013-10-08 printStats(): Print the size of the symbol table in bytesEelco Dolstra3-0/+15
2013-10-08 Deduplicate filenames in PosEelco Dolstra3-6/+7
This saves ~4 MiB of RAM for NixOS system instantiation, and ~18 MiB for "nix-env -qa".
2013-10-08 Treat undefined variable errors consistentlyEelco Dolstra3-2/+8
Previously, a undefined variable inside a "with" caused an EvalError (which can be caught), while outside, it caused a ParseError (which cannot be caught). Now both cause an UndefinedVarError (which cannot be caught).
2013-10-08 Show the exact position of undefined variablesEelco Dolstra4-21/+18
In particular, undefined variable errors in a "with" previously didn't show *any* position information, so this should help a lot in those cases.
2013-10-08 Remove some unused functionsEelco Dolstra1-15/+0
2013-10-08 Merge VarRef into ExprVarEelco Dolstra4-21/+8
2013-10-07 Don't show calls to primops in stack tracesEelco Dolstra1-6/+1
Since they don't have location information, they just give you crap like: while evaluating the builtin function `getAttr': while evaluating the builtin function `derivationStrict': ...
2013-10-02 Fix segfault in nix-repl / hydra-eval-jobsEelco Dolstra1-3/+3
If a "with" attribute set fails to evaluate, we have to make sure its Env record remains unchanged. Otherwise, repeated evaluation gives a segfault: nix-repl> :a with 0; { a = x; b = x; } Added 2 variables. nix-repl> a error: value is an integer while an attribute set was expected nix-repl> b Segmentation fault
2013-10-02 Report OOM errors betterEelco Dolstra2-1/+8
2013-10-02 Fix typoEelco Dolstra1-1/+1
2013-09-18 build-remote.pl: Don't use substituters on the remoteEelco Dolstra1-1/+1
It's kinda pointless to check substituters on the remote side, since we just checked them locally.
2013-09-17 RestoreSink: Slightly reduce the number of concurrent FDsEelco Dolstra1-0/+1
2013-09-10 Version was called 1.6, not 1.6.0Eelco Dolstra1-1/+1
2013-09-10 Bump version numberEelco Dolstra1-1/+1
2013-09-10 Update release notesEelco Dolstra1-1/+37
2013-09-06 Remove stray debug lineEelco Dolstra1-2/+0
2013-09-06 Don't apply the CPU affinity hack to nix-shell (and other Perl programs)Eelco Dolstra5-7/+11
As discovered by Todd Veldhuizen, the shell started by nix-shell has its affinity set to a single CPU. This is because nix-shell connects to the Nix daemon, which causes the affinity hack to be applied. So we turn this off for Perl programs.
2013-09-06 typoDomen Kožar1-1/+1
2013-09-06 nix-shell: Support a .drv as argumentEelco Dolstra1-8/+13
Fixes #161.
2013-09-03 nix-env -i: Add a flag ‘--remove-all’ / ‘-r’Eelco Dolstra2-17/+39
This is equivalent to running ‘nix-env -e '*'’ first, except that it happens in a single transaction. Thus, ‘nix-env -i pkgs...’ replaces the profile with the specified set of packages. The main motivation is to support declarative package management (similar to environment.systemPackages in NixOS). That is, if you have a specification ‘profile.nix’ like this: with import <nixpkgs> {}; [ thunderbird geeqie ... ] then after any change to ‘profile.nix’, you can run: $ nix-env -f profile.nix -ir to update the profile to match the specification. (Without the ‘-r’ flag, if you remove a package from ‘profile.nix’, it won't be removed from the actual profile.) Suggested by @zefhemel.
2013-09-03 nix-env: Use wildcard match by defaultEelco Dolstra2-13/+8
That is, you don't need to pass '*' anymore, so nix-env -qa is equivalent to nix-env -qa '*'
2013-09-03 nix-env: Load files in ~/.nix-defexpr on demandEelco Dolstra3-3/+18
So if you do "nix-env -qa -A nixos", then other channels won't be parsed/evaluated at all.
2013-09-03 Check for name collisions in the input Nix expressionsEelco Dolstra1-3/+9
2013-09-03 Work on Values instead of ExprsEelco Dolstra4-50/+62
This prevents some duplicate evaluation in nix-env and nix-instantiate. Also, when traversing ~/.nix-defexpr, only read regular files with the extension .nix. Previously it was reading files like .../channels/binary-caches/<name>. The only reason this didn't cause problems is pure luck (namely, <name> shadows an actual Nix expression, the binary-caches files happen to be syntactically valid Nix expressions, and we iterate over the directory contents in just the right order).
2013-09-03 ReformatEelco Dolstra1-33/+35
2013-09-03 Get rid of the parse tree cacheEelco Dolstra6-34/+35
Since we already cache files in normal form (fileEvalCache), caching parse trees is redundant. Note that getting rid of this cache doesn't actually save much memory at the moment, because parse trees are currently not freed / GC'ed.
2013-09-02 Add some support code for nix-replEelco Dolstra3-12/+26
2013-09-02 Get rid of a signedness warningEelco Dolstra1-1/+1
2013-09-02 Fix whitespaceEelco Dolstra8-82/+82
2013-09-02 Lower xz compression levelEelco Dolstra1-1/+1
Fixes #84.
2013-09-02 Manual: Make '' a bit clearerEelco Dolstra1-6/+6
Issue #162.
2013-09-02 Fix manual errorEelco Dolstra1-1/+1
Reported by Matija Šuklje. Fixes #163.
2013-09-02 Update the release notesEelco Dolstra1-0/+52
2013-09-02 Adda test for build-max-log-sizeEelco Dolstra2-14/+11