about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2004-06-21 * Ugh, nasty Heisenbug due to an uninitialiased variable. The bugEelco Dolstra1-0/+1
only caused a crash if the program was *not* invoked with a high verbosity level.
2004-06-21 * Remove obstructing invalid store paths add[Text]ToStore().Eelco Dolstra1-0/+6
2004-06-21 * Wrap calls to registerSubstitute() in a single transaction toEelco Dolstra3-11/+13
improve throughput. * Don't build the `substitute-rev' table for now, since it caused Theta(N^2) time and log file consumption when adding N substitutes. Maybe we can do without it.
2004-06-21 * Disable calls to fsync() since Berkeley DB's DB_TXN_WRITE_NOSYNCEelco Dolstra1-0/+8
flag doesn't seem to work as advertised.
2004-06-20 * Re-enable support for substitutes in the normaliser.Eelco Dolstra5-107/+383
* A better substitute mechanism. Instead of generating a store expression for each store path for which we have a substitute, we can have a single store expression that builds a generic program that is invoked to build the desired store path, which is passed as an argument. This means that operations like `nix-pull' only produce O(1) files instead of O(N) files in the store when registering N substitutes. (It consumes O(N) database storage, of course, but that's not a performance problem). * Added a test for the substitute mechanism. * `nix-store --substitute' reads the substitutes from standard input, instead of from the command line. This prevents us from running into the kernel's limit on command line length.
2004-06-20 * Refactoring.Eelco Dolstra3-41/+52
2004-06-19 * Re-enable build hooks.Eelco Dolstra1-72/+325
2004-06-18 * Big refactoring. Move to a much more explicitly state machine basedEelco Dolstra3-764/+869
approach. This makes it much easier to add extra complexity in the normaliser / realiser (e.g., build hooks, substitutes).
2004-06-18 * This is also useful.Eelco Dolstra3-1/+263
2004-06-18 * Shared (garbage collecting) pointers. Copied from Boost.Eelco Dolstra12-17/+1268
2004-06-15 * Refactoring.Eelco Dolstra3-83/+57
2004-06-08 * Cleanup.Eelco Dolstra1-10/+17
2004-05-18 * Drain the output of the build hook to show error messages. UglyEelco Dolstra1-4/+26
hack.
2004-05-18 * setpgrp() is not POSIX (and on Mac OS X it's different than onEelco Dolstra1-1/+1
Linux), so use setpgid().
2004-05-14 * execl() requires a terminating 0.Eelco Dolstra1-10/+21
* When a fast build wakes up a goal, try to start that goal in the same iteration of the startBuild() loop of run(). Otherwise no job might be started until the next job terminates.
2004-05-13 * Distributed builds and load balancing now seem to work pretty well.Eelco Dolstra1-24/+74
(Though the `build-remote.pl' script has a gigantic race condition).
2004-05-13 * Load balancing. `build-remote.pl' will only execute up to aEelco Dolstra1-1/+1
per-machine maximum number of parallel jobs on a remote machine.
2004-05-13 * The build hooks used to implement distributed builds can now be runEelco Dolstra2-134/+352
in parallel. Hooks are more efficient: locks on output paths are only acquired when the hook says that it is willing to accept a build job. Hooks now work in two phases. First, they should first tell Nix whether they are willing to accept a job. Nix guarantuees that no two hooks will ever be in the first phase at the same time (this simplifies the implementation of hooks, since they don't have to perform locking (?)). Second, if they accept a job, they are then responsible for building it (on the remote system), and copying the result back. These can be run in parallel with other hooks and locally executed jobs. The implementation is a bit messy right now, though. * The directory `distributed' shows a (hacky) example of a hook that distributes build jobs over a set of machines listed in a configuration file.
2004-05-12 * A switch `-j NUMBER' to set the maximum number of parallel jobs (0 =Eelco Dolstra4-8/+29
no limit). * Add missing file to distribution.
2004-05-12 * Pass to the build hook all sorts of information useful forEelco Dolstra1-6/+41
distributing a build action to another machine. In particular, the paths in the input closures, the output paths, and successor mapping for sub-derivations.
2004-05-12 * An quick and dirty hack to support distributed builds.Eelco Dolstra5-11/+33
2004-05-11 * True parallel builds. Nix can now run as many build jobs inEelco Dolstra8-288/+676
parallel as possible (similar to GNU Make's `-j' switch). This is useful on SMP systems, but it is especially useful for doing builds on multiple machines. The idea is that a large derivation is initiated on one master machine, which then distributes sub-derivations to any number of slave machines. This should not happen synchronously or in lock-step, so the master must be capable of dealing with multiple parallel build jobs. We now have the infrastructure to support this. TODO: substitutes are currently broken.
2004-05-11 * Ignore interrupt signals while handling an exception.Eelco Dolstra1-4/+15
* Ignore EINTR in reads and writes.
2004-05-04 * Allow the location of the store etc. to be specified usingEelco Dolstra1-12/+19
environment variables. * Started adding some automatic tests. * Do a `make check' when building RPMs.
2004-04-23 * Pass SYSTEM through config.h, and allow spaces.Eelco Dolstra2-1/+3
2004-04-22 * Don't create $(localstatedir)/nix/profiles if --disable-init-stateEelco Dolstra1-3/+0
is specified.
2004-04-21 * Do initialise state (the DB etc.) when doing a `make install',Eelco Dolstra1-7/+0
unless `--disable-init-state' is passed to configure.
2004-04-21 * Recurse into attribute sets and lists when getting derivations fromEelco Dolstra1-0/+4
an expression.
2004-04-14 * Be stricter in verifying store paths.Eelco Dolstra3-4/+9
2004-04-05 * When something goes wrong in the evaluation of a Nix expression,Eelco Dolstra8-89/+200
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-04-02 * Print a more useful error message in case of an invalid derivationEelco Dolstra1-1/+6
binding.
2004-03-30 * The recent change in nixpkgs of calling `stdenv.mkDerivation'Eelco Dolstra2-2/+11
instead of `derivation' triggered a huge slowdown in the Nix expression evaluator. Total execution time of `nix-env -qa' went up by a factor of 60 or so. This scalability problem was caused by expressions such as (x: y: ... x ...) a b where `a' is a large term (say, the one in `all-packages-generic.nix'). Then the first beta-reduction would produce (y: ... a ...) b by substituting `a' for `x'. The second beta-reduction would then substitute `b' for `y' into the body `... a ...', which is a large term due to `a', and thus causes a large traversal to be performed by substitute() in the second reduction. This is however entirely redundant, since `a' cannot contain free variables (since we never substitute below a weak head normal form). The solution is to wrap substituted terms into a `Closed' constructor, i.e., subst(subs, Var(x)) = Closed(e) iff subs[x] = e have substitution not descent into closed terms, subst(subs, Closed(x)) = Closed(x) and otherwise ignore them for evaluation, eval(Closed(x)) = eval(x). * Fix a typo that caused incorrect substitutions to be performed in simple lambdas, e.g., `(x: x: x) a' would reduce to `(x: a)'.
2004-03-28 * Added an operator `?' to test for attribute existence, e.g.,Eelco Dolstra2-1/+10
`attrs ? x' yields true iff `attrs' has an attribute named `x'.
2004-03-28 * Added an operator `~' to select paths within a derivation. E.g.,Eelco Dolstra3-0/+16
{stdenv, bash}: derivation { builder = bash ~ /bin/sh; args = ["-e" "-x" ./builder.sh]; ... } Here the attribute `builder' will evaluate to, e.g., `/nix/store/1234abcd...-bash-2.0.1/bin/sh'.
2004-03-28 * Added plain lambdas, e.g., `let { id = x: x; const = x: y: x; }'.Eelco Dolstra5-37/+63
`bla:' is now no longer parsed as a URL. * Re-enabled support for the `args' attribute in derivations to specify command line arguments to the builder, e.g., ... builder = /usr/bin/python; args = ["-c" ./builder.py]; ...
2004-03-27 * Disallow the Nix store or any of its parents from being symlinks.Eelco Dolstra2-11/+37
This is because the contents of these symlinks are not incorporated into the hashes of derivations, and could therefore cause a mismatch between the build system and the target system. E.g., if `/nix/store' is a symlink to `/data/nix/store', then a builder could expand this path and store the result. If on the target system `/nix/store' is not a symlink, or is a symlink that points somewhere else, we have a dangling pointer. The trigger for this change is that gcc 3.3.3 does exactly that (it applies realpath() to some files, such as libraries, which causes our impurity checker to bail out.) An annoying side-effect of this change is that it makes it harder to move the Nix store to a different file system. On Linux, bind mounts can be used instead of symlink for this purpose (e.g., `mount -o bind /data/nix/store /nix/store').
2004-03-27 * Do not close a nesting level twice after close() has beenEelco Dolstra2-1/+11
called explicitly on a Nest object.
2004-03-22 * Some more nesting.Eelco Dolstra3-14/+40
2004-03-22 * Nix now has three different formats for the log information itEelco Dolstra3-7/+52
writes to stderr: - `pretty': the old nested style (default) - `escapes': uses escape codes to indicate nesting and message level; can be processed using `log2xml' - `flat': just plain text, no nesting These can be set using `--log-type TYPE' or the NIX_LOG_TYPE environment variable.
2004-03-19 * `null' is a normal form.Eelco Dolstra1-8/+11
2004-03-18 * Escape codes to force line breaks to be ignored.Eelco Dolstra1-1/+9
2004-03-18 * Added an extra escape code to signal "unimportant" messages. If a tree ↵Eelco Dolstra3-9/+46
only has unimportant messages, it is collapsed by the default. * Also added an optional integer argument to the escape code for opening a nesting level to indicate lack of importance. If set, the tree is collapsed by default.
2004-03-18 * Collapsable trees.Eelco Dolstra3-5/+65
2004-03-18 * Use unordered lists, which is more sensible semantically forEelco Dolstra2-50/+43
representing tree structures.
2004-03-18 * Don't use tables. Konqueror likes this much better.Eelco Dolstra2-71/+33
2004-03-17 * Display the popup directly over the abbreviation.Eelco Dolstra1-2/+2
2004-03-17 * A simpler way of implementing the store reference popups, thanks toEelco Dolstra2-17/+14
Martin and CSS guru Martijn Vermaat.
2004-03-16 * Store paths are now abbreviated in the generated HTML file.Eelco Dolstra3-13/+89
Hovering over the abbreviated path will reveal the full path. This probably only works in Mozilla.
2004-03-15 * Added a utility that can be used to produce nice HTML pages from NixEelco Dolstra5-1/+239
build logs. The program `log2xml' converts a Nix build log (read from standard input) into XML file that can then be converted to XHTML by the `log2html.xsl' stylesheet. The CSS stylesheet `logfile.css' is necessary to make it look good. This is primarily useful if the log file has a *tree structure*, i.e., that sub-tasks such as the various phases of a build (unpack, configure, make, etc.) or recursive invocations of Make are represented as such. While a log file is in principle an unstructured plain text file, builders can communicate this tree structure to `log2xml' by using escape sequences: - "\e[p" starts a new nesting level; the first line following the escape code is the header; - "\e[q" ends the current nesting level. The generic builder in nixpkgs (not yet committed) uses this. It shouldn't be to hard to patch GNU Make to speak this protocol. Further improvements to the generated HTML pages are to allow collapsing/expanding of subtrees, and to abbreviate store paths (but to show the full path by hovering the mouse over it).
2004-03-12 * Set the NIX_STORE and NIX_BUILD_TOP environment variables inEelco Dolstra3-3/+19
builders to point to the store and the temporary build directory, respectively. Useful for purity checking. * Also set TEMPDIR, TMPDIR, TEMP, and TEMP to NIX_BUILD_TOP to make sure that tools in the builder store temporary files in the right location.