about summary refs log tree commit diff
path: root/src/libexpr/parser.cc
AgeCommit message (Collapse)AuthorFilesLines
2005-03-10 * Check for duplicate attributes and formal parameters in NixEelco Dolstra1-0/+61
expressions.
2004-11-03 * string2ATerm -> overloaded toATerm.Eelco Dolstra1-1/+1
2004-10-29 * Drop ATmake / ATMatcher also in handling store expressions.Eelco Dolstra1-1/+1
2004-10-26 * Don't use ATmake / ATmatch anymore, nor the ATMatcher class.Eelco Dolstra1-10/+7
Instead we generate data bindings (build and match functions) for the constructors specified in `constructors.def'. In particular this removes the conversions between AFuns and strings, and Nix expression evaluation now seems 3 to 4 times faster.
2004-09-09 * A very dirty hack to make setuid installations a bit nicer to use.Eelco Dolstra1-0/+2
Previously there was the problem that all files read by nix-env etc. should be reachable and readable by the Nix user. So for instance building a Nix expression in your home directory meant that the home directory should have at least g+x or o+x permission so that the Nix user could reach the Nix expression. Now we just switch back to the original user just prior to reading sources and the like. The places where this happens are somewhat arbitrary, however. Any scope that has a live SwitchToOriginalUser object in it is executed as the original user. * Back out r1385. setreuid() sets the saved uid to the new real/effective uid, which prevents us from switching back to the original uid. setresuid() doesn't have this problem (although the manpage has a bug: specifying -1 for the saved uid doesn't leave it unchanged; an explicit value must be specified).
2004-08-04 * Allow primops with more that 1 arguments.Eelco Dolstra1-1/+1
2004-04-05 * When something goes wrong in the evaluation of a Nix expression,Eelco Dolstra1-10/+17
print a nice backtrace of the stack, rather than vomiting a gigantic (and useless) aterm on the screen. Example: error: while evaluating file `.../pkgs/system/test.nix': while evaluating attribute `subversion' at `.../pkgs/system/all-packages-generic.nix', line 533: while evaluating function at `.../pkgs/applications/version-management/subversion/default.nix', line 1: assertion failed at `.../pkgs/applications/version-management/subversion/default.nix', line 13 Since the Nix expression language is lazy, the trace may be misleading. The purpose is to provide a hint as to the location of the problem.
2004-02-04 * Extended the `inherit' syntax to optionally select attributes fromEelco Dolstra1-5/+10
other attribute sets, rather than the current scope. E.g., {inherit (pkgs) gcc binutils;} is equivalent to {gcc = pkgs.gcc; binutils = pkgs.binutils;} I am not so happy about the syntax.
2004-02-04 * Use a map to lookup primops.Eelco Dolstra1-16/+8
* Various performance improvements in the evaluator. * Do not link against unused (and missing!) libraries (-lsglr, etc.).
2004-02-03 * Verify that all variables in a Nix expression are defined.Eelco Dolstra1-0/+16
2004-02-02 * Added syntactic sugar to the construction of attribute sets toEelco Dolstra1-18/+38
`inherit' variables from the surrounding lexical scope. E.g., {stdenv, libfoo}: derivation { builder = ./bla; inherit stdenv libfoo; xyzzy = 1; } is equivalent to {stdenv, libfoo}: derivation { builder = ./bla; stdenv = stdenv; libfoo = libfoo; xyzzy = 1; } Note that for mutually recursive attribute set definitions (`rec {...}'), this also works, that is, `rec {inherit x;}' is equivalent to `let {fresh = x; body = rec {x = fresh;};}', *not* `rec {x = x}'.
2004-01-30 * Replaced the SDF parser by a substantially faster Bison/FlexEelco Dolstra1-112/+42
parser (roughly 80x faster). The absolutely latest version of Bison (1.875c) is required for reentrant GLR support, as well as a recent version of Flex (say, 2.5.31). Note that most Unix distributions ship with the prehistoric Flex 2.5.4, which doesn't support reentrancy.
2004-01-29 * Optimised the SDF grammar.Eelco Dolstra1-2/+2
2004-01-15 * Catch SIGINT to terminate cleanly when the user tries to interruptEelco Dolstra1-0/+2
Nix. This is to prevent Berkeley DB from becoming wedged. Unfortunately it is not possible to throw C++ exceptions from a signal handler. In fact, you can't do much of anything except change variables of type `volatile sig_atomic_t'. So we set an interrupt flag in the signal handler and check it at various strategic locations in the code (by calling checkInterrupt()). Since this is unlikely to cover all cases (e.g., (semi-)infinite loops), sometimes SIGTERM may now be required to kill Nix.
2004-01-05 * Implemented Eelco V.'s `nix-env -I' command to specify the defaultEelco Dolstra1-8/+10
path of the Nix expression to be used with the import, upgrade, and query commands. For instance, $ nix-env -I ~/nixpkgs/pkgs/system/i686-linux.nix $ nix-env --query --available [aka -qa] sylpheed-0.9.7 bison-1.875 pango-1.2.5 subversion-0.35.1 ... $ nix-env -i sylpheed $ nix-env -u subversion There can be only one default at a time. * If the path to a Nix expression is a symlink, follow the symlink prior to resolving relative path references in the expression.
2003-11-22 * Maintain integrity of the substitute and successor mappings whenEelco Dolstra1-34/+47
deleting a path in the store. * Allow absolute paths in Nix expressions. * Get nix-prefetch-url to work again. * Various other fixes.
2003-11-19 * nix-env: a tool to manage user environments.Eelco Dolstra1-0/+2
* Replace all directory reading code by a generic readDirectory() function.
2003-11-19 * Refactoring (step 2).Eelco Dolstra1-3/+1
2003-11-19 * Refactoring: put the Nix expression evaluator in its own library soEelco Dolstra1-0/+164
that it can be used by multiple programs.